Assignment 7 – Music Database

 

(UML class diagram: Due before class on April 16, 2008) - Maximum Points = 10

 

Write a UML diagram for the following class(es).

 

(Program: Due before class on April 23, 2008) - Maximum Points = 50

The purpose of this assignment is to use classes of objects in Java to create and manage a database consisting of songs. The application is a system for managing the music on an iPod similar to iTunes.

A) Each song record contains a name of a song (e.g. White Bird), length of song (in minutes and seconds, e.g. 3:14), artist name (e.g., It’s a Beautiful Day), album name (e.g., It’s a Beautiful Day), and date that the song was last played (e.g. 4/15/2008).

B) The collection of songs will be read from a data file (selected through FileChooser.pickAFile()).The different fields in the song record should be separated by a # in the data file. Continue reading the file for data until you reach the end of the file [see http://csc.ColumbusState.edu/summers/NOTES/1301/labs/lab37.htm for an example]. NOTE: I will test your program with my data file using this format!!!

For example, the data file might look like:

White Bird#3:14#It’s a Beautiful Day# It’s a Beautiful Day#4/15/2008
Badge#3:34#Eric Clapton#The Best of Eric Clapton#3/31/2008
Adouma#2:58#Santana#Shaman#4/1/2008
What’s the Frequency, Kenneth?#3:59#R.E.M.#Monster#3/24/2008
Stomp#4:40#Phil Keaggy#220#2/21/2007

C) Your program should allow the user to

·        Add another song to the database (iPod),

·        get a list of all songs on the iPod listing ALL of the information, or

·        JUST the list of songs

·        all of the songs for a particular artist followed by the number of songs listed and the total time of songs in days (e.g. 1.95 days)

 

You may either the Scanner class (with System.in and System.out()),  JOptionPane, or a GUI (with TextFields), or anything else you would like to try.

D) You MUST define a Song class (defined in Song.java). The classes must have a default constructor along with at least one other, appropriate accessors and modifiers, and a toString method.

E) You must either use the Java Date class or define your own to hold the date last played.

Submit all of the .java files containing your program and associated classes.

Grades are determined using the following scale:

·                     Runs correctly..…………………:___/10

·                     Correct output……..……………:___/10

·                     Design of output..………………:___/8

·                     Design of logic…………………:___/10

·                     Standards……………………….:___/7

·                     Documentation.………………...:___/5

Grading Rubric  (Word document)