Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q #2. Design and implement a database of Library books. Use an array based list class to store Books data. Each entry in the list
Q #2. Design and implement a database of Library books. Use an array based list class to store Books data. Each entry in the list will contain Title of the book, number of Pages, Price and Publisher name. Use 'struct to define one book entry. Perform the following operations on the Books list. (30-Points) Constructor and Destructor to allocate list of books and destroy it Class should have a function void InsertBook(), that will get books detail from the user and add to the list. Class should have a function void SortBookList () that will use Selection Sort to sort the list of books according to the book title. Class should have a function void searchBook(string) that will use Binary Search to search a Book by title in the List. If found, it will display data of the book on the screen, otherwise it will display, 'Book not Found'. Class should have a function void Display BookList ) that will display detail of cach book in the list. In main(), get data of 10 books from the user and add to the List. Use SortBookList () to sort the list. Use searchBook () to search a book entered by the user and display its data on the screen, if found
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started