A Book Shop wants to display books to users, based on their requirement (Price/Author) Design the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A Book Shop wants to display books to users, based on their requirement (Price/Author) Design the application for this requirement as follows: Design a class Book which has following attributes String bookname String author int price abstract void display() Note: This class should NOT be directly instantiable. Design a class ClassicBook which derives from Book and has following attribute int publishYear It should have a parameterized constructor to initialize all attributes - - It should implement display() Note: display() should display the details of the old classical books. Name: Mein Kampf Author: Adolf Hitler Price: 1500 publisher: 1942 Design a class NewSellingBook which derives from Book with additional attributes as follows String Publisher; It should have a parameterized constructor to initialize all the attributes It should implement display() Note: display should display the details of the new released books. eg Name: Becoming Steve Jobs Author: Brent Schlender Rick Tetel Price: 464 Publisher: Hodder & Stoughton Design a class BookStore having following static ClassicBook flist] static NewSellingBook sList[] HI) iv) v) void loadData(); o Load hardcoded ClassicBook & NewSellingBook (10 each) in respective array. void displayByPrice(int startRange, intendRange); o Displays all books (ClassicBook & NewSellingBook ) who fall in this range displayByAuthor(String b); void Display all books (Classic Book & NewSellingBook ) from the particular Author. IMP: Record for ClassicBook has only 4 values-Name, Author, Price and publishYear Record for NewSellingBook has 4 values-Name, Author, Price and Publisher Evaluation Marks Distribution a) b) c) d) Steps Proper design of Book class Proper design of ClassicBook class Proper design of NewSellingBook Class Proper design of Bookstore class Create class called Online Bookshop having the main() method, in which following functionality needs to be implemented 10 H) Create an object of BookStore Call the loadData() and load the data into the array.(either take from keyboard or hardcode by calling constructor) If no 5 books(ClassicBook & NewSellingBook) are present display "Not enough Books" Accept a Range from user (accept a start range & end range). Marks 2 1 1 Call displayByPrice() to display all the books (ClassicBook & NewSellingBook) which are in the range you accepted from user vi) Accept an Author name from user vii) Call displayByAuthor() to display all books (ClassicBook & NewSellingBook) that belong to the author Steps a) Proper working of loadData() b) Proper working off 5 books availability check c) Proper implementation of display() in respective classes d) Proper working of displayByPrice() Marks 4 2 2 5 A Book Shop wants to display books to users, based on their requirement (Price/Author) Design the application for this requirement as follows: Design a class Book which has following attributes String bookname String author int price abstract void display() Note: This class should NOT be directly instantiable. Design a class ClassicBook which derives from Book and has following attribute int publishYear It should have a parameterized constructor to initialize all attributes - - It should implement display() Note: display() should display the details of the old classical books. Name: Mein Kampf Author: Adolf Hitler Price: 1500 publisher: 1942 Design a class NewSellingBook which derives from Book with additional attributes as follows String Publisher; It should have a parameterized constructor to initialize all the attributes It should implement display() Note: display should display the details of the new released books. eg Name: Becoming Steve Jobs Author: Brent Schlender Rick Tetel Price: 464 Publisher: Hodder & Stoughton Design a class BookStore having following static ClassicBook flist] static NewSellingBook sList[] HI) iv) v) void loadData(); o Load hardcoded ClassicBook & NewSellingBook (10 each) in respective array. void displayByPrice(int startRange, intendRange); o Displays all books (ClassicBook & NewSellingBook ) who fall in this range displayByAuthor(String b); void Display all books (Classic Book & NewSellingBook ) from the particular Author. IMP: Record for ClassicBook has only 4 values-Name, Author, Price and publishYear Record for NewSellingBook has 4 values-Name, Author, Price and Publisher Evaluation Marks Distribution a) b) c) d) Steps Proper design of Book class Proper design of ClassicBook class Proper design of NewSellingBook Class Proper design of Bookstore class Create class called Online Bookshop having the main() method, in which following functionality needs to be implemented 10 H) Create an object of BookStore Call the loadData() and load the data into the array.(either take from keyboard or hardcode by calling constructor) If no 5 books(ClassicBook & NewSellingBook) are present display "Not enough Books" Accept a Range from user (accept a start range & end range). Marks 2 1 1 Call displayByPrice() to display all the books (ClassicBook & NewSellingBook) which are in the range you accepted from user vi) Accept an Author name from user vii) Call displayByAuthor() to display all books (ClassicBook & NewSellingBook) that belong to the author Steps a) Proper working of loadData() b) Proper working off 5 books availability check c) Proper implementation of display() in respective classes d) Proper working of displayByPrice() Marks 4 2 2 5
Expert Answer:
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these programming questions
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
Dickens, Kristen, is enrolled as a doctoral student in the Counselor Education at the University of New Orleans. She is a registered counselor intern in the state of Louisiana and works at a...
-
Question 13 Case Study - Little Pear Administration Pty Ltd (LPA) You are the payroll officer for Little Pear Administration Pty Ltd (LPA). Debra Foy is a company employee and has approached you with...
-
Prepare jouranl entries for each transation listed in M5-5 Using the following categories, indicate the effects of the following transactions. Use + for increase and - for decrease and indicate the...
-
S Brown Company issued 107,000 shares of its $1 par common stock to the Mary Keim law firm as compensation for 4,700 hours of legal services performed. Keim's usual rate is $160 per hour. By what...
-
Suppose your name is Grant Scheffer, and Advanced Automotive repaired your car. You settled the bill as noted on the following invoice. To you this is a purchase invoice. To Advanced Automotive, it...
-
Use the following information from separate companies a through f to compute times interest earned. Which company indicates the strongest ability to pay interest expense as it comes due? (Round...
-
1.3 What is the Purpose of the Project THE RELATIONSHIP BETWEEN COMPETENCY IN FINANCIAL STEWARDSHIP AND THE RISING HEALTHCARE COSTS AMONG HEALTHCARE MANAGEMENT
-
What is the relationship between a table of Movies and a table of ActorsActresses and how might it be implemented in a relational database?
-
You are the CFO of a nondividend paying firm that currently has excess cash reserves You are preparing for internal management meeting where dividend are on the agenda You know that the CEO favours...
-
Explain Project Management and identify the primary reasons projects fail. Answer in details.
-
A Spanish company is considering two hotel projects in December 2021. Project A will be in Jamaica and Project B will be in Haiti. Project A Project B US#x27;000 US#x27;000 Initial investment 865,000...
-
Organizational Behavior Management (OBM) plays a key role in preventing and reducing medical errors. Based on the reading, how does OBM impact the reduction of medical errors? Response should be 0ne...
-
a. What does Emotional Intelligence represent for you as a manager or employee? b.Is the Emotional Intelligence of employees important for employers to know and understand? Why or why not? c.What is...
-
1. How does a catapult work? 2. What type of simple machine is it? (incline plane, lever, pulley, screw, wedge, or wheel and axle) How do you know? http://www.mikids.com/Smachines.htm 3. How far were...
-
11 12 13 4 5 6 Use the CORREL function in cell J11 to determine if there is a statistical relationship between the height and weight of the men in the sample. Use the FORECAST.LINEAR function (or the...
-
Distinguish among total-moisture content, free-moisture content, equilibrium-moisture content, unbound moisture, and bound moisture.
-
Draw an ERD for each of the following situations. (If you believe that you need to make additional assumptions, clearly state them for each situation.) Draw the same situation using the tool you have...
-
Locate three sites on the Web that have interactive database systems attached to them. Evaluate the functionality of each site and discuss how its interactive database system is likely to affect that...
-
Contrast the following terms: a. Horizontal partitioning; vertical partitioning b. Physical file; tablespace c. Normalization; denormalization d. Range control; null control e. Secondary key; primary...
-
At December 31, 2019, Blumenthall Corporation reported the shareholders' equity accounts shown here (as adapted, with dollar amounts in millions): Blumenthall's 2020 transactions included the...
-
Blumenthall Corporation earned \(\$ 350\) million in net income in 2020. Use this and the data in exercise E8-23 to prepare the shareholders' equity section of the company's balance sheet at December...
-
(Optical Products Company reported the following shareholders' equity 'on its balance sheet: {Requirements} 1. What could have caused Optical Products's preferred shares to decrease during 2020? Cite...
Study smarter with the SolutionInn App