tsuPod3 ... (linked lists)
CS 2308
Completed Program Due: Friday 4/10/09 at 10:00pm Monday 4/13/09 10:00pm
100 points
Yet again we will be implementing the tsuPod, but this time it will look much different...
For this
program we will be implementing the storage portion of the tsuPod
(pronounced "su Pod" - the much smaller version of the iPod). We will
be storing the following information:
- Number of songs limitted by memory space.
- We will use a linked list to store the songs.
- The number of MB of memory will be set when the tsuPod is "constructed"
- You must provide a constructor that will set the size of the memory. The maximum is 256MB.
- The user of the class will pass in a size. If the size is greater than 256MB, set the size to 256MB.
- For each song we will store the title (string), artist (string), and size (int) in MB
- the title and artist cannot be blank
- the size must be greater than zero
You will create your own header files for the TsuPod and Song classes.
You will create your own driver program (examples will the shown in
class). Note: the driver from the last tsuPod program should still work.
Things you should do:
- Create classes for TsuPod and Song with appropriate header files.
- here is a start for the TsuPod.h file. You should document it.
- implement methods in the TsuPod class to:
- addSong(Song s)
- removeSong(Song s)
- shuffle() (we will work on this in class)
- showSongList()
- sortSongList() (we will work on this in class)
- getTotalMemory()
- getRemainingMemory()
- implement methods in the Song class to:
- set and get all instance variables
- overload ==, <,and > operators (used in sorting)
- for < and > use artist, then title, then size
- NOTE: You should not have to
change your Song class from the previous tsuPod assignment. Contact me
if you were unable to make the Song class work in the last assignment.
NOTES:
- You must do this program by yourself..
- This program may be done in your choice of environment, but must compile and run on Linux. I will provide a makefile that will help with compilation.
- The
program must be done in an object-oriented fashion.
- Hand in a zipped
file named tsuPod3_xxxxxx.zip where
xxxxxx is your TXstate id. This file should contain your
C++ source
files tsuPod_xxxxxx.h, song_xxxxxx.h, tsuPod_xxxxxx.cpp,
song_xxxxxx.cpp and tsuPodDriver_xxxxxx.cpp and a make file. The goal
is that we should be able to unzip the file in a new directory and run
make on it to test the program. You should try this before handing in
the zip file to make sure it works.
Turn in: UPDATE: You will not turn in a hard copy for this assignment.
Upload: the source file(s) (compressed with zip or tar and zip or gzip if multiple source files) only, using this link.
Be sure to follow the style standards for the course.
Updated 3/25/09