Question: See page 260 programming exercise 7 data structure using c++ 2nd edition. a. Some of the characteristics of a book are the title, author(s), publisher,
See page 260 programming exercise 7 data structure using c++ 2nd edition.
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 of the book. Similarly, the typical operations that can be performed on the number of copies 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 (if one 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 of class 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.
here is sample output below..


sample output The title of the book is same. The details of the book are: Title: Data Structures Publisher: XYZ Number of copies: 5 ISBN Number: 67837216 Year of Publication: 1995 Price: 90.50 Authors DEF The title of the book is same. The details of the book are: Title: Programming with C Publisher: WXY Number of copies: 5 ISBN Number: 76873216 Year of Publication: 1997 Price: 200.50 Authors GHI JKL The updates have been made The details of the book are: Title: Programming with C Publisher: WXY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
