المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : c++ code required for this small study program



C++ Programming
03-28-2009, 06:21 PM
: Use Dev-C++ 4.9.9.2
Your task is to implement a Catalog of Books.
1. For this first you have to implement Book class The Book class is a simple class to store information about a particular book and it has the following data members:
o Title of the book (string)
o Author of the book (string)
o ISBN of the book (string)
o Status of the book (bool)
Write default and parameterized constructors and setters getters for the Book class.
2. Catalog class is a linked list of Book objects and that can perform the following functionality.
o Add method to add a book in the Catalog
o printAllBooks method to print all the books in the Catalog.
o searchByAuthor method will take author name as an argument and will find a book written by that author.
o Available method to print all those books that are currently available. If the status of a book is false than it means that book is not available, if the status is true then it means book is available.
3. Include a main function as follows:
o Main will create 5 different books and add them in Catalog
o Print all books present in Catalog linked list.
o Search a Book by its Author name.
o Print all the books which are available.
Hint:
Make Nodes of Book type and then link them to make Catalog linked list. It means there will be another class between Book and Catalog and that is BookNode class