Question: Write a C++ programme to create a class by name Book Data Members of the class BOOK are BOOK NO BOOK NAME BOOK PRICE
Write a C++ programme to create a class by name Book Data Members of the class BOOK are BOOK NO BOOK NAME BOOK PRICE integer 20 characters float TOTAL_COST() Calculate the cost of N books where N is passed as an argument. Member Functions of the class BOOK are INPUT() function to read BOOK NO. BOOK_NAME, BOOK PRICE PURCHASE() Get an input for the number of copies to be purchased. It uses TOTAL_COST() function to calculate the cost of N books and prints the total cost to be paid by the user. Create the necessary object for this class to run this program effectively. (Implement the OOPS concepts Polymorphism, inheritance, and Friend function wherever it is necessary)
Step by Step Solution
There are 3 Steps involved in it
Heres a simple C program that follows the requirements you mentioned include include class Book priv... View full answer
Get step-by-step solutions from verified subject matter experts
