



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




C Sc 335 Spring 2008 – Final Project Grader: Patrick Valenzuela Abstract: Apple's iTunes has become one of today's most popular software applications. However, it's common to hear users (especially computer scientists) gripe about its bugginess, speed, and limitations. i++Tunes is your opportunity to improve upon Apple's work or simply experience what it's like to create such an application. This project requires the implementation of a media player with iTunes-comparable features. Its name, graphical user interface, and design are up to your team. Requirements: Play MP3s: Obviously, your music player will need to play music. We will be providing libraries that make it easy to play MP3 files. See the “Implementation notes” section for more details. Song data: Each song must contain a specific set of attributes. They are: name, artist, album, track number (and number of total tracks on album), genre, explicit (yes or no), user rating (from 0 to 5 – feel free to use stars or some other indicator), play count, and album artwork. You may add more attributes, but these are the required items. Your GUI must have the ability to display and edit all of this information. Song library: Your player is built around a collection of songs (the library). The library must have the ability to add and remove songs. All song data, library data, and preferences must be persistent. That is, all data and settings are to be preserved each time you exit the application. Saved data and settings should be reloaded on launch. Refer to the “Implementation notes” section for more information about this. You can assume that the user will not move any files on the disk. Playlists: A playlist is a subset of the library (i.e. each song in a playlist must reside in the library). Each playlist has manual add and remove functionality, but these operations do not affect the song's presence in the library. If a song is deleted from the library, it should no longer reside in any playlist. You should store playlists in a hierarchical manner (like folders/files on a hard disk). The user should be able to browse all playlists and playlist folders. Of course, it should be easy to create and modify playlists. Smart playlists: A smart playlist should follow all of the properties of a normal playlist except for how songs are added and removed. Each smart playlist should have a single rule for membership. If any song in the library meets the rule, it belongs in the playlist. If it does not meet the rule, it should not be in the playlist.
We will restrict possible smart playlist rules to three parts of a song: name, artist, and album. A rule will only concern one of these items. For each field, there should be four options: is, is not, contains, and does not contain. All rules should be case-insensitive. Below are four example smart playlist rules and a description of which songs belong in each corresponding playlist:
Implementation notes: MP3 player: We are providing a Java class called SongPlayer (and an associated enum type SongPlayerStatus) that makes use of the JavaZoom JLayer MP3 library. Your job is to integrate SongPlayer into your system. Since SongPlayer extends the class java.util.Observable, you will need to make your play-handling class implement the java.util.Observer interface. When constructing a SongPlayer, pass the reference to your Observer. SongPlayer has a very important method: public boolean playSong(java.io.File songFile) This is the method used to play a song given a reference to an MP3 file. After a song has been played or an error has been encountered, SongPlayer will notify its Observers, passing along a value of SongPlayerStatus. Javadoc documentation and the necessary files (with complete instructions) are linked from the class web site. Persistence: There are a few ways that this can be implemented:
References: Apple's iTunes page (information and download): http://www.apple.com/itunes/jukebox/ iTunes article on Wikipedia (history and feature overview): http://en.wikipedia.org/wiki/Itunes Object Serialization Made Easy: http://www.javacoffeebreak.com/articles/serialization/