Question: Please help out with this practice question, thank you! You are required to write a C++ program that creates a class with the following details:

Please help out with this practice question, thank you!

Please help out with this practice question, thank you! You are requiredto write a C++ program that creates a class with the following

You are required to write a C++ program that creates a class with the following details: 0 A Cd class (Parent class): 0 private: l const char * performers; l const char * label; I int selections; I double playtime; l private Data Members 0 A default Constructor that makes performers and label to point to a heap memory location of 8 char and assign them both the initial value of "Unknown". The default constructor also assigns the initial value of O and 0.0 to selections and playtime respectively. 0 A parameterized constructor that has the signature CdCconst char * performers, const char * label, int selections, double playtime) and makes performers point to a heap memory location with a (size + 1) of performers variable from the parameter. You can get the size of the char array using strlen available in the library. Do the same for label as well except you should get the size of label from the parameter variable. Set selections and playtime to their corresponding values from the parameters. 0 Create a vi rtual void Report() method that displays the values of performers, label, selections and play time. (See output below for more information). 0 Make sure to write appropriate destructor for clearing up the heap memory. 0 A Classic class (child class): 0 private: l const char * primaryWork; O A default Constructor that makes primaryWork to point to a heap memory location of 8 char and assign it to an initial value of "Unknown". 0 A parameterized constructor that has the signature ClassicCconst char* primaryWork, const char* performers, const char* label, int selections, double playtime) and maps to the parameterized constructor of Cd class. It makes primaryWork point to a heap memory location with a (size + 1) of primaryWork variable from the parameter. You can get the size of the char array using strlen available in library. 0 Create a vi rtual void Report() method that displays the values of primaryWork. (See output below for more information). 0 Make sure to write appropriate destructor for clearing up the heap memory. . Use this main method to run the program. Please follow the comments in the main method to complete it to show output like that provided below: Using object directly: Performer(s) : Beatles Label: Capitol Number of selections: 14 Play time: 35.5 Primary work: Piano Sonata in B flat, Fantasia in C Performer(s): Alfred Brendel Label: Philips Number of selections: 2 Play time: 57.17 Using type cd * pointer to objects: Performer(s) : Beatles Label: Capitol Number of selections: 14 Play time: 35.5 Primary work: Piano Sonata in B flat, Fantasia in C Performer(s) : Alfred Brendel Label: Philips Number of selections: 2 Play time: 57.17 C: \\Users\\Razi\\Documents\\Visual Studio 2019\\CSCI 10610\\Lab 6\\Debug\\Lab 6. exe (process 16940) exited with code -1. To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the conso le when debugging stops. Press any key to close this window

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 Programming Questions!