try this out.

Professional university library maintains an inventory of books. The list includes details like Author, price, title, publisher, acc_no, and number of copies of each book.

Whenever new books are purchased the librarian adds details into the database. The chief librarian occasionally requests for a list of all books in the database.

Required:
Assuming the database to be an array of ten (10) books, construct a class called book with suitable data members and member functions to:

(i) Insert a new book record into the database
(ii) Display a list of all books in the database
(ii) Write a main function to test the program
Are you asking us to try this out for our own benefit, or did you have a question? Looks alot like a homework question...
Last edited on
i found in a past paper and its like am not able to do it. can you please help me out?
Knoledge of classes/structs (discussed in the tutorial) is the key.

Interesting exam question though. Such a problem would be more at home in a database course in my opinion.
Topic archived. No new replies allowed.