Question
Design a class bookType that defines a book as a class. Each object of the class bookType will hold the following information about a book:
Design a class bookType that defines a book as a class. Each object of the class bookType will hold the following information about a book:
Title, number of authors, up to four authors, publisher, year published, ISBN 13 (with dashes), price, number of copies in stock (may be 0)
Include the member functions to perform the various operations on objects of type bookType: get and set all member variables.
Add a member function to update the number of copies in stock. Add the appropriate constructors and a destructor (if one is needed). Ensure a default constructor is coded and the constructor initializes all data members. Remember, an array of classes uses a default constructor only.
ALL member variables must be private and accessed through member functions. The main client program CANNOT access the variables directly.
Ensure the class declaration and class implementation files are in separate header and code (.cpp) files.
Write a client program that uses the class bookType and tests various operations on the objects of the class bookType. Declare an array of 100 components of type bookType in the client program.
Using a function, open the attached datafile. Request the file name from the user. If the file does not open, display a proper message and exit the program. The file open should be in main and test a return value of success or failure.
Read until end of file. Do not hardcode and use the actual number of books as the maximum (limiting factor) for the array of books. Keep a count of actual rows read and pass into and out of any functions and processes.
Place all function prototypes and const variables for the client program in a header file. Include the header file in the client program. Include error checking
please help i have no idea how to start this home work.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started