Computer Science, asked by salmashaikh722003, 7 months ago

Write a C++ program to create a class
Book
having
data members
book name
author and
price
Accept and display
data
for book having maximum
price​

Answers

Answered by sheelayadav47198964
1

Answer:

C++ Develop a program that creates a class for a book. The main program will simply test this class. The class will have the following data members:

A string for the name of the author

A string for the book title

A long integer for the ISBN

The class will have the following member functions (details about each one are below:

A default constructor A Print function which prints out all the information about the book.

A GetData function which reads information from a file into the data members.

A function GetISBN that returns the integer containing the ISBN. (This will be needed in Part 2).

You must create your program using the following three files: book.h

- used for declaring your class. In this header file, the declarations of the class and its members (both data and functions) will be done without the definitions. The definitions should be done in the book.cpp file. book.cpp - contains the definitions of the member functions: The default constructor will initialize the author's name to "No name", the title to "Unknown title", and the ISBN to 0.

Similar questions