Question: Define a class BOOK with the following specifications : Private members of the class BOOK are BOOK NO BOOK TITLE PRICE integer type 20 characters

Define a class BOOK with the following specifications : Private members of the class BOOK are BOOK NO BOOK TITLE PRICE integer type 20 characters float (price per copy) A function to calculate the total cost 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() number of copies to be purchased. It invokes function to read BOOK NO. BOOK TITLE, function to ask the user to input the TOTAL COST() and prints the total cost to be paid by the user. Note : You are also required to give detailed function definitions.

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!