#include <iostream> #include <string> #include <vector> using namespace std; class Song{ public: Song(); //default constructor Song(string t, string a, double d); //parametrized constructor string...

70.2K

Verified Solution

Question

Programming

#include

#include

#include

using namespace std;

class Song{

public:

Song(); //default constructor

Song(string t, string a, double d); //parametrizedconstructor

string getTitle()const; // return title

string getAuthor()const; // return author

double getDurationMin() const; // return duration in minutes

double getDurationSec() const; // return song's duration inseconds

void setTitle(string t); //set title to t

void setAuthor(string a); //set author to a

void setDurationMin(double d); //set durationMin to d

private:

string title; //title of the song

string author; //author of the song

double durationMin; //duration in minutes

};

Song::Song(){

title =\"\";

author = \"\";

durationMin = 0;

}

Song::Song(string t, string a, double d){

//complete your code here for Task2

//the parameter t is for title, a is for author and d is fordurationMin

}

string Song::getTitle()const{

//complete your code here for Task3

}

string Song::getAuthor()const{

return author;

}

double Song::getDurationMin()const{

return durationMin;

}

double Song::getDurationSec()const{

//complete your code here for Task4

//return the duration of the song in seconds

}

//complete the code for three member functions for Task5

// void setTitle(string t); //set title to t

// void setAuthor(string a); //set author to a

// void setDurationMin(double d); //set durationMin to d


Answer & Explanation Solved by verified expert
3.6 Ratings (640 Votes)
CPROGRAMinclude include include using namespace stdclass SongpublicSong default constructorSongstring t string a double d parametrizedconstructorstring getTitleconst return titlestring getAuthorconst return authordouble    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students