Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i. Draw the UML diagram of the class Book ii. Write the .h file of the class Book iii. Implement the class iv. Write a
i. Draw the UML diagram of the class Book ii. Write the .h file of the class Book iii. Implement the class iv. Write a test program which will define a Book object, access its fields and display its information
Part III. (40 points): Class implementation A class BOOK with the following specifications: Private members of the class BOOK are BOOK NO BOOKTITLE PRICE TOTAL COST () integer type 20 characters float (price per copy) A function to calculate the total cost for N number of copies where N is passed to the function as argument. Public members of the class BOOK are INPUT) PRICE PURCHASE () function to read BOOK NO. BOOKTITLE, function to ask the user to input the number of copies to be purchased. It invokes TOTAL_COST ) and prints the total cost to be paid by the user. Constructor and Copy constructor i . Draw the UML diagram of the class BOOK ii. Write the .h file of the class BOOK iii. Implement the class iv. Write a test program which will define a BOOK object, access its fields and display its informationStep 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