Homework 8, A Class to Holds Songs.
Short Description:
Design a class to hold songs in a music database.
This assignment is worth 5 points.
Goals
When you finish this homework, you should have:
Formal Description
In the music database project we will need to store song information. The purpose of this assignment is to design that class that will hold songs.
A song consist of a title, a song id, an artist id and the number of up votes and down votes the song has received.
- The title is a string
- The song ID is an integer
- The artist ID is also an integer.
- Up votes and down votes are integers.
The database will need to load songs from a file on startup. The user will be able to query the data base to perform actions like:
- Search for songs by title.
- Search for songs by artist.
- Sort the songs by title.
- Sort the songs by popularity.
- Add up votes or down votes to a song.
- Print information about an individual song.
- Print all of the songs.
Your job for this assignment is to design the song class (SongT) not the entire project. Do not worry about array operations, just the song class.
Please note, your song class should not perform any I/O. You will write auxiliary functions to perform these tasks.
You should do the following:
- Perform a basic analysis of the problem
- Identify the member data associated with this class.
- Identify any restrictions on the data and how/where these restrictions will be enforced.
- Identify the member functions associated with this class.
- Based on your analysis use software such as umletino to produce an UML design for your class.
- Document your work using the design template.
- You may delete the following sections:
- Structure Chart
- Top Level Functions
- Enumerated1T
- Structure1T
- You will need to add a section for your test design (see below)
- Design a set of test routines for your SongT
- You should address how you will test this class.
- You should address how you will test each member function.
- These tests might be quite trivial, however, you should provide some plan for testing.
- Add a section the design document where you describe your test plan.
Required Files
A single word document containing your design.
Submission
Submit the word document to the d2l folder Homework 8 by the due date.