Q #2. Design and implement a database of Library books. Use an array based list class...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. • 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 each 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. 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. • 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 each 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.
Expert Answer:
Answer rating: 100% (QA)
Answer include include using namespace std struct Book string title int pages double price string pu... View the full answer
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these programming questions
-
Design and implement a class for B-trees.
-
Design and implement a better Web page for translating English text into Pirate talk. The JavaScript code for performing the translation is provided below. The PHRASES array contains English...
-
Design and implement a Java program using the latest version of the Java Cryptography Architecture (JCA) to encrypt a file of arbitrary length with its digest appended. You may assume that your input...
-
Use a calculator to express each number in Problems 39 and 40 as a decimal to the capacity of your calculator. Observe the repeating decimal representation of the rational numbers and the non...
-
1. What must a wrongful taker of property do to avoid legal responsibility for having specific intent to deprive the owner permanently of his property? 2. Does a wrongful taker of property have...
-
Esfandairi Enterprises is considering a new three-year expansion project that requires an initial fixed asset investment of $2.35 million. The fixed asset will be depreciated straight-line to zero...
-
This chapter placed emphasis on a "transaction-based perspective" related to customers. What would be different about a transaction involving an investor? What do we mean by transaction?
-
Fee Founders has perpetual preferred stock outstanding that sells for $60 a share and pays a dividend of $5 at the end of each year. What is the required rate of return?
-
Read the given MATLAB codes, show the value of counter after the program finishes executing. clc clear counter=0; for ii=1:5 end if ii == 3; break; end counter counter+1; (10.0)
-
Code Churn is a common metric used to measure the efficiency and productivity of software engineers and computer programmers. It?s usually measured as the percentage of a programmer?s code that must...
-
1). On January 1, 2021, a company granted stock options to employees for the purchase of 20,000 shares. Each option allows the employees to purchase one share of the company's $3 par common stock at...
-
(a) Let A = {1,2,3,4}, B = {3kk e Z-{-1,1}} and C = {ne Zn+n = 0}. Which one of the following statements is True? Explain your answer i. AnB = 0 ii. B-C=0 iii. BnC = 0 iv. AUC =0 (b) Let A and B be...
-
D-Solar is a retailer of solar panels. The demand in Canada in the previous year was 100,000 panels. There are two suppliers that can provide one of the required products. One of the suppliers is...
-
The horizontal motion of the plunger and shaft is arrested by the resistance of the attached disk which moves through the oil bath. If the velocity of the plunger is v0 in the position x where x = 0...
-
1. Write a Java program to do the following set of actions: a. Get the size of an array from the user and store it to a variable 'n'. b. Get the elements of the array of size 'n' from the user. c....
-
Youve decided you want to get your MBA, which will cost you $15,000. If you have $10,000 now and can make 7.5% on your money, how soon can you attend classes? Youve just been hired on your first job!...
-
Michelle Inc. uses a level 4 variance analysis of its manufacturing overhead costs and has the following results for April. A. Budgeted direct labour-hours per unit is used to allocate variable...
-
Some people argue that the internal control requirements of the Sarbanes-Oxley Act (SOX) put U.S. companies at a competitive disadvantage to companies outside the United States. Discuss the...
-
Prepare a high-level summary of the main requirements for evaluating DBMS products for data warehousing.
-
Describe and contrast the focus of data mining and predictive analytics. Give some examples.
-
What is the data dictionary's function in database design?
-
Using tha data file usmacro, estimate the ARDL \((2,1)\) model Your estimates should agree with the results given in equation (9.42). Use these estimates to verify the forecast results given in Table...
-
Using the data file usmacro, estimate the \(\operatorname{AR}(1)\) model \(G_{t}=\alpha+\phi G_{t-1}+v_{t}\). From these estimates and those obtained in Exercise 9.16, use the results from Exercise...
-
Consider the \(\operatorname{ARDL}(p, q)\) equation and the data in the file usmacro. For \(p=2\) and \(q=1\), results from the LM test for serially correlated errors were reported in Table 9.6 for...
Study smarter with the SolutionInn App