Question
DATA STRUCTURE/C++_ 7. a. Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of publication. Design the class
DATA STRUCTURE/C++_
7. a. Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of publication. Design the class bookType that defines the book as an ADT. Each object of the class bookType can hold the following information about a book: title, up to four authors, publisher, ISBN, price, and number of copies in stock. To keep track of the number of authors, add another data member. Include the member functions to perform the various operations on the objects of bookType. For example, the typical operations that can be performed on the title are to show the title, set the title, and check whether a title is the same as the actual title ofthe book. Similarly, the typical operations that can be performed on the number ofcopies in stock are to show the number of copies in stock, set the number of copies in stock, update the number of copies in stock, and return the number of copies in stock. Add similar operations for the publisher, ISBN, book price, and authors. Add the appropriate constructors and a destructor (ifone is needed). b. Write the definitions of the member functions of the class bookType. c. Write a program that uses the class bookType and tests the various operations on the objects ofclass bookType. Declare a vector container of type bookType. Some of the operations that you should perform are to search for a book by its title, search by ISBN, and update the number of copies in stock.
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