Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROJECT 2 INSTRUCTIONS BELOW (THIS IS FOR REFERENCE, THERE'S NO NEED TO HELP WITH PROJECT 2 SINCE IT IS ALREADY OVER) Programming Assignment 3 Note:

image text in transcribed

PROJECT 2 INSTRUCTIONS BELOW (THIS IS FOR REFERENCE, THERE'S NO NEED TO HELP WITH PROJECT 2 SINCE IT IS ALREADY OVER)

image text in transcribed

Programming Assignment 3 Note: When you turn in an assignment to be graded in this class you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor) Programming Project 3 builds on the work you completed in Programming Project 2. Begin by writing a subclass of your Song class and call it MySong. The MySong class includes one additional data field, playcount. If the playcount is not present in the data file, then assign a value of 0 to the playcount instance variable Write the class MusicManager that contains the main method. Use the SongReader class to read the input file by creating a SonqReader object in your MusicManager class and calling the methods of the SongReader class The MusicManager class will provide a variety of functions based on input to the program from command line arguments. The arguments have a very specific ordering. The first argument is the name of the file that contains all of the song data. The format of this file is the same as described for Project 2 with an additional tag for the playcount, . When your MusicManager program reads this input file, it will be creating MySong objects The second command line argument is the number that refers to the desired functionality for the MusicManager program, 1, 2, or 3. Here is the specified behavior for each of the three options Display the top 10 songs with the highest playcount ordered from highest to lowest playcount. If the playlist contains less than 10 songs, display all the songs Reads the third command line argument as an artist name and displays a message if the playlist contains any songs by that artist. Note: a multi-word artist name can be passed as a single command line argument if it is enclosed in double quotes. For example, 1. 2. java MusicManager myPlaylist.data 2 "Iron & Wine" the command line argument array is interpreted as string[] args {"myPlaylist.txt ", "2", "Iron & wine''): = Reads the third command line argument as an artist name and displays all songs by that artist The songs are grouped by album and for each album the songs are listed in alphabetical order by title 3. It is expected that your program will be well documented and you are required to write a private helper method called printHeading in the MusicManager class that outputs the following information to the console in an easy-to-read format: your name, the project number, the course identifier (CMSC 256), and the current semester. You will call this method as the first statement in your main method. All files must contain a comment block at the beginning that includes the file name; all of the same information that was specified for the helper method printHeading; and a brief description of the file's purpose You will submit the project files (Song.java, SongReader.java, MySong.java, and MusicManager.java - if you wrote your own stack class, submit it, if you used one of stack classes from Blackboard, DO NOT SUBMIT IT) to the assignment link in Blackboard. Do not compress the files, they should both be submitted as a single submission of individual files Programming Assignment 3 Note: When you turn in an assignment to be graded in this class you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assistance from the instructor) Programming Project 3 builds on the work you completed in Programming Project 2. Begin by writing a subclass of your Song class and call it MySong. The MySong class includes one additional data field, playcount. If the playcount is not present in the data file, then assign a value of 0 to the playcount instance variable Write the class MusicManager that contains the main method. Use the SongReader class to read the input file by creating a SonqReader object in your MusicManager class and calling the methods of the SongReader class The MusicManager class will provide a variety of functions based on input to the program from command line arguments. The arguments have a very specific ordering. The first argument is the name of the file that contains all of the song data. The format of this file is the same as described for Project 2 with an additional tag for the playcount, . When your MusicManager program reads this input file, it will be creating MySong objects The second command line argument is the number that refers to the desired functionality for the MusicManager program, 1, 2, or 3. Here is the specified behavior for each of the three options Display the top 10 songs with the highest playcount ordered from highest to lowest playcount. If the playlist contains less than 10 songs, display all the songs Reads the third command line argument as an artist name and displays a message if the playlist contains any songs by that artist. Note: a multi-word artist name can be passed as a single command line argument if it is enclosed in double quotes. For example, 1. 2. java MusicManager myPlaylist.data 2 "Iron & Wine" the command line argument array is interpreted as string[] args {"myPlaylist.txt ", "2", "Iron & wine''): = Reads the third command line argument as an artist name and displays all songs by that artist The songs are grouped by album and for each album the songs are listed in alphabetical order by title 3. It is expected that your program will be well documented and you are required to write a private helper method called printHeading in the MusicManager class that outputs the following information to the console in an easy-to-read format: your name, the project number, the course identifier (CMSC 256), and the current semester. You will call this method as the first statement in your main method. All files must contain a comment block at the beginning that includes the file name; all of the same information that was specified for the helper method printHeading; and a brief description of the file's purpose You will submit the project files (Song.java, SongReader.java, MySong.java, and MusicManager.java - if you wrote your own stack class, submit it, if you used one of stack classes from Blackboard, DO NOT SUBMIT IT) to the assignment link in Blackboard. Do not compress the files, they should both be submitted as a single submission of individual files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

What is a benefi t change log?

Answered: 1 week ago