Question: Write a C + + program that has a class named as Book and can store the following information. 1 5 table [ [
Write a program that has a class named as Book and can store the following information.
tableMember Variables and Methods,InformationtableBookTitle AuthorName, Publisher,YearOfPublication PriceUse proper data types for all the variablesCreate a parameterized constructor,Create setter and getter methods,void displayBookDetailsDisplay all the informationdouble getPriceWithDiscountCalculate and return price with discount
In main function create an instance of Book using parameterized constructor and initialize it with appropriate values and call displayBookDetails to display all information. Create another instance of Book and use setter and getter method for this instance. After that, call getPriceWithDiscount for both objectsinstances
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
