CS 117, Introduction to Computer Science

Compact Disc Library!

Design document due at the beginning of class on Friday, 10/26/01.
Program due by 5 PM on Wednesday, 10/31/01.

Overview

For this program, you will create a Java library to store information on your compact discs. Users will be able to enter in information about all their CDs, search for a particular CD, and display all CDs in sorted order.

Specifics

When the program starts, the user should see a ListBox that provides the following options: If the user chooses "Enter new CD", the user should be prompted to enter in the artist name, the album name, and the year that the album was released. You can do this with three successive InputBoxes, or you can use a MultiInputBox if you wish to figure out how that works.

If the user chooses "Search for a particular CD", the user should be asked via a ListBox whether to serch by artist name, album name, or year. If the item can be found, display the first one you find in a MessageBox. Otherwise, display a MessageBox indicating that the CD could not be found in the library.

If the user chooses "Display CDs sorted by artist", display an OutputBox showing in tabular form all the CDs in the order requested.

Your program should consist of three classes:

CompactDisc: this is an instantiable class that is used to contain the information for a particular compact disc.
CompactDiscLibrary: this is an instantiable class that contains an array for holding CompactDisc objects, as well as methods for doing all the above activities.
CompactDiscLibraryMain: this is a non-instantiable class that contains your main method. The main method should just instantiate a CompactDiscLibrary object and call a single public method.

Design

This project is the biggest we've done in this class so far. It is essential that you plan it out in advance! On Friday, 10/26/01, you should turn in a design document containing the following information: You should plan on getting each of your functions to work independently. Among the many benefits of this approach is the constant availability of a partial solution that can be handed in for grading, or demonstrated to a customer, or released to the public for early testing.

You should start coding your project before turning in the design document. Rapid prototyping of your ideas is a good way to validate your design.

Good luck!!!