Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 2 table [ [ Singer , MusicCD,Customer ] , [ Sname: string,title: string, ] , [ , table [ [ yearRealeased :
Task
tableSingerMusicCD,CustomerSname: string,title: string,tableyearRealeased : intSingerNametableName: stringbuysMusicCD SingerprintSinger: void,MusicCDtableCustomerstringprintCustvoid
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 MalkowichTitle: 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started