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.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
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 moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more