Question: Task 2 . ( Using C + + ) table [ [ Singer , MusicCD,Customer ] , [ Sname: string, table [ [
Task Using C
tableSingerMusicCD,CustomerSname: string,tabletitle: stringyearRealeased: intSingerNametableName: stringbuysMusicCD tableSingerprintSinger: voidtableMusicCDprintMCD: voidtableCustomerstringprintCust:void
MusicCD belongs to only one singerMusicCD class contains an object of Singer class
Name of the customer should be accepted as parameter from main all other attributes of the other classes should be entered through the keyboard.
Customer buys Music CDsCustomer class contains an array object of MusicCD class
Sample Output:
tableCustomer Name: Johny Malkowich,Title: Paradise,Year Released: Singer Name: Tanita TikaramTitle: Sun Lee,Year Released: Singer Name: Sun LeeTitle: Red Moon,Year Released: Singer Name: Mary BlackTitle: Lonely,Year Released: Singer Name: David HusseloffTitle: Sahaj Love,Year Released: Singer Name: Nirmala Devi
a Write code to design each class.
b Write main function that will do the following steps:
Create an object for customer class. If necessary, create objects for other classes as well
Call the necessary methods to print the details of customer as shown in the sample output above.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
