Create a NetBeans 8 project for this task, named Task1. You are required to write a Java 8 program that opens and reads a delimited data file that is located relative to the NetBeans project root folder. The delimited data file contains information about prize winning music albums ranked by sales. The data file is called albums.txt. The data file should not be altered and should be considered as a read-only data file.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Create a NetBeans 8 project for this task, named Task1.
You are required to write a Java 8 program that opens and reads a delimited data file that is located relative
to the NetBeans project root folder. The delimited data file contains information about prize winning music
albums ranked by sales. The data file is called albums.txt. The data file should not be altered and should be
considered as a read-only data file.
Within the ‘albums’ data file, there are 20 entries that each represent a single album. On the first line of
each album entry there are six data fields representing the following information (in order): the current sales
ranking, the title of the album, the name of the artist, the year the album was released, and the total
number of sales to date (‘M’ denotes million and ‘K’ denotes thousand). The first line is then followed by the
list of song tracks for the album (one per line, in the original published order), with each track indicating the
duration of the song (minutes:seconds) in braces. Each album entry is separated by a dashed line in the text
file.
You are required to implement a Java class to represent an album. The program should parse the data file,
create an object for each album, and store all the objects into a suitable collection. Figure 3 provides a
partial UML class representation of the class that you will need to implement. It indicates required data
members and accessor (i.e., getter) methods that map to those data members, and a toString() method. It is
left to you to determine class data types and how the Album objects should be initialised.

Once all the objects are loaded into the collection, the program should present the User with a consolebased menu to interact with the data set. This menu should loop until the User enters a character to exit the
menu (e.g., zero as illustrated below). In addition to an exit option, the menu should offer three other
options: list all albums, select a single album to view, and search in song titles. 3
On starting the program, the following menu should be displayed to the console:
List albums.........1
Select album........2
Search titles.......3
Exit................0
Enter choice:>
The User can simply exit the program by entering zero. The three other menu options allow the User to
inspect the information in the data set (note again that this program is entirely read-only and there is no
requirement to add, update or delete any part of the data set). The necessary interaction of the program
with respect to these options is illustrated in Appendix A.
Note that console output should be neatly formatted, and some consideration will be given to formatting
when the program is assessed. In particular, when the option to view a single trade company details is
selected, it must result in the invocation of the toString() method for that particular Album object. You are
encouraged to explore and utilise a StringBuilder object when implementing the toString() method for the
Album class

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY