1
Answer

c++ code required

tayyab ali

tayyab ali

15y
2.4k
1
This is really related to c++ so i need your help in this case.you have to solver ths
solution about the given problem as asked...i shall be very thankful to you.
Your Submission must include:

 

  1. A working MakeFile (Dev-C++ project File).
  2. All the Source Code(.h and .cpp files) necessary to compile and run your program.

Note: Use Dev-C++ 4.9.9.2

o       To give you some practice exercise of Linked List.

o       Make you able to write methods for the linked according to the given requirements

 

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:

    • Title of the book (string)
    • Author of the book (string)
    • ISBN of the book (string)
    • 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:

    • Main will create 5 different books and add them in Catalog
    • Print all books present in Catalog linked list.
    • Search a Book by its Author name.
    • 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

Answers (1)