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
-
Carla Dennis is a first-class Welder Fabricator with MLM Fabrication & Construction Ltd., Women in any skilled craft job are a rarity in the largely mens world of construction and fabrication. MLM...
-
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...
-
Determine if the following systems are compatible and, if so, find the general solution: (a) 6x1 +3x2 = 12 4x1 + 2x2 = 9 (b) 8x1 + 12x2 = 16 6x1 + 9x2 = 13 (c) x1 + 2x2 = 1 2x1 + 5x2 = 2 3x1 + 6x2 =...
-
DURATION time 0 1 CALCULATE THE DURATIONS OF THE FOLLOWING 10-YEAR BONDS: 1) 8.25% coupon (yield = 8.25%) 2) 12.00% coupon (yield = 12.00%) 3) 0% coupon (yield = 8.25%) 4) which of the three has the...
-
Presented below are the condensed financial statements of Global Enterprises, Inc. The companys inventory is valued using LIFO. The companys footnotes reveal that the LIFO reserve was as follows....
-
Eagle Credit Union (ECU) has experienced a 10% default rate with its commercial loan customers (i.e., 90% of commercial loan customers pay back their loans). ECU has developed a statistical test to...
-
Date/Time/Location/Manner of Proceeding a. Which court or tribunal did you attend? What is the address? Answer: Ontario Court of Justice. ( b. What was the date and time of the proceeding? c. Did you...
-
The Alfredo Fragrance Company produces only one product, a perfume called Hint of Elegance. Hint of Elegance consists of two secret ingredients blended into an exclusive fragrance, which is marketed...
-
regarding the 'nature vs. nurture' debate: How do you think the neurobiological aspects of psychopathology interact with environmental factors in the development and treatment of mental illnesses?...
-
1. A rock is tossed straight up with a speed of 26 m/s. When it returns, it falls into a hole 14 m deep. Ignore air resistance a. How long the rock in the air, from the instant it is released until...
-
How do structural inequalities in health care and other public services reflect broader patterns of social stratification ?
-
Presented below are selected transactions of Federer AG . Federer sells in large quantities to other companies and also sells its product in a small retail outlet. March 1 Sold merchandise on account...
-
The cost of operating your business is $22.8 million. Business has been growing and you plan to expand in the next fiscal year. In anticipation of that, you wish to make a sufficient profit this year...
-
Use the following table definitions to answer the question below. customer(custno, name, address, city, state, zip, phone, income) asset(assetno, assetdesc, assettype) service(servno, servdesc,...
-
A firm has an effective (after-tax) cost of debt of 3%, and its weight of debt is 40%. Its equity cost of capital is 11%, and its weight of equity is 60%. Calculate the firms weighted average cost of...
-
The liquidliquid extractor in Figure 8.1 operates at 100F and a nominal pressure of 15 psia. For the feed and solvent flows shown, determine the number of equilibrium stages to extract 99.5% of the...
-
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...
-
Our proof of the Strong Duality Theorem, as well as the presentation of the tableau method in Section 3, depended on the fact that the dictionary and tableau methods were equivalent. More...
-
Let \(A\) be the set \(\{\alpha,\{1, \alpha\},\{3\},\{\{1,3\}\}, 3\}\). Which of the following statements are true and which are false? () . (b) {a} A. (c) {1,} CA. (d) {3,{3}} CA. (e) {1,3} A. (f)...
-
Which of the following arguments are valid? For the valid ones, write down the argument symbolically. (a) I eat chocolate if I am depressed. I am not depressed. Therefore I am not eating chocolate....
Study smarter with the SolutionInn App