Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

=+3. How will you measure action objective?

Answered: 1 week ago

Question

=+2. What research methodologies would be most effective?

Answered: 1 week ago

Question

=+ Focus groups with representative publics. Which publics?

Answered: 1 week ago