This project will allow you to write a program to get more practice with object-oriented ideas that we explored in the previous project, as well as some practice with more advanced ideas such as inheritance and the use of interfaces.
Ipods and other MP3 players organize a user’s music selection into groups known as playlists. These are data structures that provide a collection of songs and an ordering for how those songs will be played. For this assignment you will be writing a set of PlayList classes that could be used for a program that organizes music for a user. These classes will be written to implement a particular PlayList interface so that they can be easily exchange in and out as the program requires. In addition, you will also be using the SimpleTrack class you wrote for the closed lab on Interfaces – if you did not finish this class before the end of lab, you will need to finish it before starting on this project.
Once you have coded and tested your SimpleTrack class, you will need to write a SimplePlaylist class that implements the Playist interface given in the project folder.
The SimplePlayList class stores music tracks in order – the first track added to the play list should be the first one removed from the play list. You should recognize this data structure as a queue (or a first-in, first-out queue). You do not need to implement the equals, hashCode and toString methods for this class but if you choose to do so make sure you document your implementations properly!
Once you have written and tested a SimpleTrack class and a SimplePlaylist class, it is time to use them to write a program to manage playlists. This program will simulate the playing of songs from a play list. For the SimplePlaylist, the songs are removed from the playlist as they are played, so you know that you’re at the end of the list when your list is empty. This program should be implemented in the file MusicPlayerSimulator.java. Note that we are not defining ANY of the methods you are using for this program – the design is all up to you. You must, however, practice good programming style – make sure you are breaking the program up into smaller methods and aren’t just trying to solve everything with one monolithic main method. If you have fewer than 5 methods for this program you are probably trying to fit too much into a single method.
Here is a sample transcript of the output of this program:
Enter database filename: input.txt Currently playing: 'Elvis Presley / Blue Suede Shoes / Elvis Presley: Legacy Edition' Next track to play: 'The Beatles / With A Little Help From My Friends / Sgt. Pepper's Lonely Hearts Club Band' [P]lay next track [A]dd a new track [Q]uit > p Currently playing: 'The Beatles / With A Little Help From My Friends / Sgt. Pepper's Lonely Hearts Club Band' Next track to play: 'The White Stripes / Seven Nation Army / Elephant' [P]lay next track [A]dd a new track [Q]uit > P Currently playing: 'The White Stripes / Seven Nation Army / Elephant' Next track to play: 'Cake / Long Line Of Cars / Comfort Eagle' [P]lay next track [A]dd a new track [Q]uit > a Track name: Requiem For A Dying Song Artist name: Flogging Molly Album name: Float Track: Requiem For A Dying Song Artist: Flogging Molly Album: Float Are you sure you want to add this track [y/n]? y Currently playing: 'The White Stripes / Seven Nation Army / Elephant' Next track to play: 'Cake / Long Line Of Cars / Comfort Eagle' [P]lay next track [A]dd a new track [Q]uit > A Track name: Look What You Made Me Do Artist name: Taylor Swift Album name: Reputation Track: Look What You Made Me Do Artist: Taylor Swift Album: Reputation Are you sure you want to add this track [y/n]? Y Currently playing: 'The White Stripes / Seven Nation Army / Elephant' Next track to play: 'Cake / Long Line Of Cars / Comfort Eagle' [P]lay next track [A]dd a new track [Q]uit > q Tracks remaining in play list ------------------------------------------------------------ 1 - 'Cake / Long Line Of Cars / Comfort Eagle' 2 - 'Nine Inch Nails / Head Like A Hole / Pretty Hate Machine' 3 - 'Flogging Molly / Requiem For A Dying Song / Float' 4 - 'Taylor Swift / Look What You Made Me Do / Reputation'
The file format that the play list manager program should read is a simple one. An input file for multiple tracks would use this format:
track 1 name,artist 1 name,album 1 name
track n name,artist n name,album n name
The sample input file used in the transcript above looks like this and is included in the project folder in a file named input.txt:
Blue Suede Shoes,Elvis Presley,Elvis Presley: Legacy Edition
With A Little Help From My Friends,The Beatles,Sgt. Pepper's Lonely Hearts Club Band
Seven Nation Army,The White Stripes,Elephant
Long Line Of Cars,Cake,Comfort Eagle
Head Like A Hole,Nine Inch Nails,Pretty Hate Machine
Make sure your programs compile and run correctly before submitting. To submit, make sure you include all of your files:
SimplePlaylist.java, SimpleTrack.java and
MusicPlayerSimulator.java files with comments indicating who wrote them and the date (make sure you change the @author tag to your name and the @version tag to the date). If you worked with a partner, there should be two @author tags. Use the file upload button and navigate to the folder your workspace is in. Then look for the CSE2123-Playlist folder – inside that folder is the src folder that has your files in it to upload. You can also just drag-and-drop the files from your Eclipse workspace directly onto the file upload button.
We value our customers and so we ensure that what we do is 100% original..
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
The Product ordered is guaranteed to be original. Orders are checked by the most advanced anti-plagiarism software in the market to assure that the Product is 100% original. The Company has a zero tolerance policy for plagiarism.Read more
The Free Revision policy is a courtesy service that the Company provides to help ensure Customer’s total satisfaction with the completed Order. To receive free revision the Company requires that the Customer provide the request within fourteen (14) days from the first completion date and within a period of thirty (30) days for dissertations.Read more
The Company is committed to protect the privacy of the Customer and it will never resell or share any of Customer’s personal information, including credit card data, with any third party. All the online transactions are processed through the secure and reliable online payment systems.Read more
By placing an order with us, you agree to the service we provide. We will endear to do all that it takes to deliver a comprehensive paper as per your requirements. We also count on your cooperation to ensure that we deliver on this mandate.Read more