It is intended to develop an application for customer management and sales in a bookstore. A customer is characterized by name and email. The bookstore has three types of customers: regular, frequent...

java homework using Strings and collections, Inheritance and polymorphism.


It is intended to develop an application for customer management and sales in a bookstore. A customer is characterized by name and email. The bookstore has three types of customers: regular, frequent and premium. The books are characterized by the author, title and base price. There are technical books and adventure books. Technical books are characterized by their specialty area and adventures have an indication of the minimum age of the target readers. The selling price of books depends on the type of customer. Frequent customers have a 5% discount. Premium customers have a 10% discount. The remaining customers don’t have a discount. a) Create the method(s) to show all books in stock b) Create the method(s) to show all purchases made c) Create the method(s) to show the sales volume of the bookstore d) Create the method(s) to display books purchased by a customer e) Invoke the methods created in the previous paragraphs in order to demonstrate your behaviors Below is an example of the requested features. The following instructions: bookStore bookStore = new bookStore("Lelo"); book l1 = new TecnicalBook("H. Schildt", "\"Java: The Complete Reference\"", 80, "Computer Science- Java"); bookStore.addBook(l1); book l2= new AdventureBook("A. Christie", "\"The Man in the Brown Suit\"", 75, 14); bookStore.addBook(l2); Client c1 = new Premium("B. Antunes", "[email protected]"); bookStore.addClient(c1); Client c2 = new Frequent("A. Oliveira", "[email protected]"); bookStore.addClient(c2); System.out.println("Initial stock:"); bookStore.showBooks(); bookStore.sale(l1, c1); System.out.println("Stock after selling:"); bookStore.showBooks(); System.out.println("Sales Volume:"+bookStore.SalesVolume); bookStore.showClientsBooks(c1); Should show this result: Initial stock: Author:H. Schildt Title:"Java: The Complete Reference" Base Price:80.0 Author:A. Christie Title:"The Man in the Brown Suit" Base Price:75.0 B. Antunes bought "Java: The Complete Reference", Tecnical Book of Computer Science- Java, for 72.0 Stock after selling: Author:A. Christie Title:"The Man in the Brown Suit" Base Price:75.0 Sales Volume:72.0 B. Antunes bought: "UML Distilled". "The Man in the Brown Suit".
Nov 21, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here