subject
Computers and Technology, 11.04.2020 04:24 xman839

Write Album's PrintSongsShorterThan() to print all the songs from the album shorter than the value of the parameter songDuration. Use Song's PrintSong() to print the songs.
#include #include #include using namespace std; class Song { public: void SetNameAndDuration(string songName, int songDuration) { name = songName; duration = songDuration; } void PrintSong() const { cout << name << " - " << duration << endl; } string GetName() const { return name; } int GetDuration() const { return duration; } private: string name; int duration; }; int main() { vector playlist; Song currentSong; string currentName; int currentDuration; unsigned int i; cin >> currentName; while (currentName != "quit") { /* Your code goes here */ } for (i = 0; i < playlist. size(); ++i) { currentSong = playlist. at(i); currentSong. PrintSong(); } return 0; }

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, safi30360oz0c34
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
image
Computers and Technology, 22.06.2019 11:30, jcazares3558
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
image
Computers and Technology, 23.06.2019 03:50, nakeytrag
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria. what am i?
Answers: 2
image
Computers and Technology, 23.06.2019 22:20, Izzyfizzy
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
You know the right answer?
Write Album's PrintSongsShorterThan() to print all the songs from the album shorter than the value o...

Questions in other subjects:

Konu
Mathematics, 19.05.2021 19:00
Konu
Arts, 19.05.2021 19:00
Konu
Mathematics, 19.05.2021 19:00