Project: playlist manager | CSE2123 | Ohio State University

Overview

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.

Objectives

  • Practice with programming fundamentals
    • Review of various Java fundamentals (branching, loops, variables, methods, etc.)
    • Review of Java File I/O concepts
    • Practice with Java ArrayList concepts
    • Practice with object-oriented programming and design
    • Practice with Java interfaces

Project Description

The SimplePlaylist Class

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!

 The PlayList Management Program

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]? 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'
  1. Ask the user to enter the name of the file that contains the play list data in the format described below.   
  2. Input the play list information from the file and store it in a SimplePlaylist object (using SimpleTrack objects).   See below for the format of this file.
  3. Indicate what song is currently playing and what song is next in the play list.  If there is no song currently playing (i.e. at the beginning right after the data file is loaded) the program should immediately advance to the next song in the list.  If the play list is empty and there is no next track, the program should indicate this with a message “Play list is empty – no more tracks”.
  4. Present the user a menu of three options – play the next song in the play list, add a new song to the play list, or quit.
  5. If the user chooses to play the next song, use the Playlist object to adjust the current track accordingly.  Make sure your code does the right thing and gives an error message if the play list is empty and the user tries to play the next song.
  6. If the user chooses to add a new track, prompt the user for the names of the song, artist and album.  Verify that the user actually wants to add the track and if they say “yes” to this prompt add the track to the play list appropriately.
  7. If the user chooses to quit, output a well-formatted report of the remaining songs in the play list, showing the name of the song, the artist and the album in the format indicated above.  If the play list is empty, indicate this with the message “No tracks remaining” where the report data would normally be.  When this report is finished the Playlist should be empty.

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

Submission Instructions

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.

Academic Brigade
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.