[url removed, login to view]
Write a program that stores details of a Song collection.
Level 1 maximum 50% (depending on implementation, demonstration, viva and documentation) must include the following:
Declaration and initialisation of variables
Separate arrays to store individual details of each item
A menu of options dependent on an integer variable
Method to add items
Method to search for an item and print details
Method to print items
Useful comments, good indentation, good use of variable names
Create a menu of options controlled with an integer variable for the programme including
input a new entry from a keyboard
search for an entry
print all the entries so far
Declare a series of arrays to hold details of Songs. A Song consists of (for example) the title, length in seconds, artist, (&acirc;€œSuperstition&acirc;€, 405, &acirc;€œStevie Wonder&acirc;€). The program should be able to store Song details in the declared arrays.
A single entry can be entered by the user typing the details in and the entry can be printed out.
Your program should provide a search method that allows the title of a given Song to be looked up in the array and the details printed to the screen.
Level 2 version A - maximum 100% (depending on implementation, demonstration, viva and documentation) must include the following:
As level 1 above plus
Method to update an entry
Method to sort items by artist (Hint use an index array for this).
Method to save data to a file
Method to retrieve data from a file
As Level 1 example plus
Expand menu with additional options and write code for the following:
An entry can be updated
Data can be sorted by artist and entries displayed in that order to the screen
Data can be stored in a text file
Data can be retrieved into the array from a text file
Level 2 Version B - maximum 100% (depending on implementation, demonstration, viva and documentation) must include the following:
Functionality as for level 2 above plus
Use of classes and objects to store and manipulate the item data
Write a new class &acirc;€˜Song&acirc;€™ to represent details of special Song objects. A Song consists of the title, length of song in seconds, artist, (&acirc;€œSuperstition&acirc;€, 2405, &acirc;€œStevie Wonder&acirc;€).
Your class definition must include an appropriate constructor method.
Your program must provide methods to allow addition, updating, searching and may also allow sorting of objects.
Your program may have a method to store all the objects from the array into a file. A further method could allow the contents of a previously stored file of objects to be restored into an array.
Create a menu of options for the programme including
Input a new object from a keyboard
Search for an object and print details to screen
Edit an object
Sort the objects
Print all the entries so far
Save objects to a file
Retrieve objects from a file