Question: Subject: data structure and algorithm Question no 01: [15 Marks Mr. Patrick is fond of reading books he is looking for a computerized way to
Subject: data structure and algorithm
Question no 01: [15 Marks Mr. Patrick is fond of reading books he is looking for a computerized way to keep record of his book collection, you have been given the responsibility to meet up his following requirements. (Use appropriate data structure to accomplish your task), develop following methods: 1. Add(): adds a new book to the list ( A book contains name of the book, author name) NOTE: every new book will have access to its neighboring books (previous and next) 2. Remove():in case any book is removed from the pile update your list 3. countBooks(): displays the total number of books (3) 4. search(): returns true if the given book is present in the list else returns false (3) 5. display(): shows the book collection (1) Output: Welcome Mr. Patrick please select anyone of the following option 1. Add a book 2. Remove a book 3. Show total number of books 4. Search a book 5. Show all books Please input No of your desired operation: 1 Please input following information. Name of the book: warrior of the light Author of the book: Paulo Coelho Successfully added Do you wish to continue? No Note: You are not allowed to use any built-in Data Structure classes to implement above scenario
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
