Question: I am trying to write a code in C++ that stores my favorite songs, artists and year they were released. For this code, I need

 I am trying to write a code in C++ that storesmy favorite songs, artists and year they were released. For this code,

I am trying to write a code in C++ that stores my favorite songs, artists and year they were released. For this code, I need to use a Class, in addition to the following criteria: * the class needs to have a constructor; *it needs to have 2-3 additional functions that do something; *it has one or two variables/attributes; * needs to create an instance and a demo of how it can be used; * needs to create a second instance and demo, * create a demo. I have the initial code below, but it's not working and I am lost on how to proceed. Can you please help me fine tune it so that it'll work in those parameters? Thank you. #include #include #include using namespace std; class Demo { private: int num = 0; string songName; string artistName; public: Demo(string songName) { this->songName = songName; } Demo &addSong(string songName) { this->songName += songName; return this: } Demo &addartistName(string artistName) { this->artistName += artistName; return this; } Demo &addNum(int num) { this->num += num; return this; } void displayMySongs() { cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!