question archive Create a class called Book
Subject:Computer SciencePrice: Bought3
Create a class called Book. The class will contain data members for name, publisher, author and price and a static variable total_price. There should be a display function to show the contents of each object (Book). Your task is to create two objecs of Book class in main() and provide different values to each object using getData(). The Details of objects should be displayed as well in the main(). Accessor and mutator should also be highlighted. Design THREE functions as follows:
• add( ) - A function that will find the sum of prices of all Book objects. Static variable may be used for this purpose.
• The >= operator should be overloaded to find which book is more expensive, its details are displayed.
totalPrice() - A static function to display the total price of all the book objects. It should be called using name of the class not object.