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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
Write 150 words on what kind of website would you like to make in the future? what sites would you like to model yours after?
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
When replacing a thermostat or water pump, coolant drained from the cooling system should be
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
question
Biology, 11.11.2020 08:00
question
Mathematics, 11.11.2020 08:00
question
Mathematics, 11.11.2020 08:00
question
Chemistry, 11.11.2020 08:00
Questions on the website: 13722362