Question: Task 2 . ( Using C + + ) table [ [ Singer , MusicCD,Customer ] , [ Sname: string, table [ [

Task 2.(Using C++)
\table[[Singer,MusicCD,Customer],[Sname: string,\table[[title: string],[yearRealeased: int],[SingerName]],\table[[Name: string],[buysMusicCD (5)]]],[\table[[Singer()],[printSinger(): void]],\table[[MusicCD()],[printMCD(): void]],\table[[Customer(string)],[printCust():void]]]]
MusicCD belongs to only one singer.(MusicCD 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 5 Music CDs.(Customer class contains an array object of MusicCD class)
Sample Output:
\table[[Customer Name: Johny Malkowich,],[Title: Paradise,Year Released: 1998,Singer Name: Tanita Tikaram],[Title: Sun Lee,Year Released: 2013,Singer Name: Sun Lee],[Title: Red Moon,Year Released: 2010,Singer Name: Mary Black],[Title: Lonely,Year Released: 2015,Singer Name: David Husseloff],[Title: Sahaj Love,Year Released: 2014,Singer Name: Nirmala Devi]]
a. Write C++ 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 method(s) to print the details of customer as shown in the sample output above.
 Task 2.(Using C++) \table[[Singer,MusicCD,Customer],[Sname: string,\table[[title: string],[yearRealeased: int],[SingerName]],\table[[Name: string],[buysMusicCD (5)]]],[\table[[Singer()],[printSinger(): void]],\table[[MusicCD()],[printMCD(): void]],\table[[Customer(string)],[printCust():void]]]]

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!