Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,728 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,321 people online right now. Registration is fast and FREE... Join Now!




CD playlist

 
Reply to this topicStart new topic

CD playlist

krazykrisi
6 Feb, 2007 - 06:30 PM
Post #1

New D.I.C Head
*

Joined: 16 Jan, 2007
Posts: 8


My Contributions
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;
}

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 05:08AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month