I have no idea where to start on this. Any tips would be great. Thanks.
CODE
/*Overloaded Operator Worksheet 1 =>> 20 points
For this worksheet, I would like you to turn in a compiler screen shot, a source listing that will resolve the following programming
assignment and the additional requested screen shots.You have just been hired by Napster.com. They would like you to create a C++ program
that will allow their customers to download songs, customized to fit a standard burnable CD. They have a classes outline as follows:
class song
{
char Name[20]; // Name of the song
char Artist[20]; // Name of the artist
int TimeLengthOfTrack; // How many seconds the song is
float DownLoadTime; // Average time to download
int StorageSizeOfTrack; // Number of bytes the track takes up
public:
.....
}
class CD
{
int NumberOfTracks; // Number of songs on the CD
int AmountOfStorageUsed; // Total storage used
int AmountOfStorageAvail; // Total storage remaining
char NameOfSong[20][20]; // Name of the song on each track
char NameOfArtist[20][20]; // Name of the song on each track
float DownLoadTimeForCD; // Total download time for all tracks on CD
public:
......
}
I would like you to create and array of 20 song instances. I would like the user to select the instances they would like on the CD.
You will need to overload the += operator for the CD class so that it will add all of the selected tracks from the array of songs.
You must meet the following requirements:
- Must not be larger than 650M in total storage used
- Must not contain more than 10 songs
- Must not have a download time of greater than 45 minutes
Considerations:
a. Create member functions / constructors as needed
b. Include error checking for the above requirements
c. Include a screen shot of several different song array elements that have data in them
d. Include a screen shot listing the contents of you cd, lising the track number, the song for that track, the artist, and the size (in bytes)
for that track.*/
#include <iostream>
using namespace std;
///////////////////////////////////////////////////////////////////
class song
{
private:
char Name[20]; // Name of the song
char Artist[20]; // Name of the artist
int TimeLengthOfTrack; // How many seconds the song is
float DownLoadTime; // Average time to download
int StorageSizeOfTrack; // Number of bytes the track takes up
public:
};
//////////////////////////////////////////////////////////////
class CD
{
private:
int NumberOfTracks; // Number of songs on the CD
int AmountOfStorageUsed; // Total storage used
int AmountOfStorageAvail; // Total storage remaining
char NameOfSong[20][20]; // Name of the song on each track
char NameOfArtist[20][20]; // Name of the song on each track
float DownLoadTimeForCD; // Total download time for all tracks on CD
public:
};
/////////////////////////////////////////////////////////////
int main()
{
CD cd1;
song song1;
}