-Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of publication. Design a class bookType that defines the book as an ADT.

1. 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.
2. Include the member functions to perform the various operations on objects of the type bookType. For example, the usual operations that can be performed on the title are to show 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 author. Add the appropriate constructors and a destructor ( if one is needed).
3. Write the definitions of the member functions of the class bookType.

Write a program that uses the class bookType and test the various operations on the objects of class bookType. Declare an array of 100 components of the type bookType. Set to 5 components. Display the output.

Recommended Answers

All 2 Replies

What have YOU done to solve the problem? You will need to post the code you have written and ask specific questions about what you do not understand.

it seems that you have not bothered to STUDY about classes and objects. Otherwise this is just a very simple code regarding basics of classes and objects which after a good introduction to OOP you could have easily solved.

Here's a link that may be helpful:

http://www.cplusplus.com/doc/tutorial/classes/

Also, google is always your friend.

Do some research and come up with some code as you have already been advised.

Good Luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.