Data Structures and Algorithms in Java
Data Structures and Algorithms in Java
6th Edition
ISBN: 9781118771334
Author: Michael T. Goodrich
Publisher: WILEY
Expert Solution & Answer
100%
Book Icon
Chapter 2, Problem 16C

Explanation of Solution

Initial considerations:

Normally, the E-book shop contains a variety list of books from which the customers places an order based on their favor.

The following architecture is not the absolute design for “e-book reader” architecture. It is the assumption and it includes variety of classes to follow the inheritance property.

Primary classes and methods:

The primary classes and the methods of E-book reader that the java software required are as follows:

  • “E-bookshop”, “Customer”, “Order”, “ItemOrder”, and “Item”.
  • E-bookshop contains the methods getDownloadURL() and getsizeMB().
    • getDownloadURL() is used to download the site of the book that the customer needs to purchase.
    • getsizeMB() is used to know the size of the book in bytes.
  • Customer class contains the method Customer()
    • This method is to retrieve the details of customer.
  • Order class contains the method Order().
    • This method places the shipping details of order.
  • ItemOrder class contains the method ItemOrder()
    • This method used to get the number of order that the customer wants to place before purchasing.
  • Item class contains no method but is generalized into three sub classes such as Book, MusicCD, and Software.
    • The Book class contains the method Book()  which is used to order the specific book based on author name.
    • The MusicCD class contains the method MusicCD() which is used to order the CD’s based on the artist collections.
    • The Software class contains the method Software() which is used to download the book based on the version.

Inheritance diagram for “E-book reader”:

Inheritance diagram is drawn from parent class to child class...

Blurred answer
Students have asked these similar questions
Use java programming properties to write all the necessary classes and/or interfaces for a solution to the problem. Focus on class structure and interaction. You may implement your solution however you wish, but you will be graded on the appropriateness of your solution to the requirements. Note the use of capitalization and parentheses for clarification. You may use whatever constructors or additional methods you wish. Define a structure that can represent Animals. Animals have two behaviors; they can speak() and they can move(). By default, when an animal moves, the text ”This animal moves forward” is displayed. By default, when an animal speaks, the text ”This animal speaks” is displayed. A general Animal should not be able to be instantiated. Define two classes, Goose and Lynx, that are Animals. Both Goose and Lynx behave such that where “Animals” is displayed in speak() or move(), “goose” or “lynx” is displayed by the appropriate classes. Finally, any instance of Goose can fly(),…
Your assignment for this course  is to implement a beginner level Book Management System  (BMS) in Java language. BMS contains 2 classes: Bookand BookList. The Book class has the following attributes: code: a String object, that hold the book’s code. title: a String object, that hold the book’s title. qua: int variable, that hold the  number of  books with the same code in the library. price: a double variable, that hold the book’s price. The BookList class contains only one data member: ArrayList<Book> t. When running the program display the menu as below:1.     Input & add book(s) to the end.2.     Display all books.3.     Search a book for given code.4.     Update the book’s price for given code.5.     Find the (first) max price value.6.     Sort the list ascendingly by code.7.     Remove the book having given code.8.     Load data from file.0.     Exit.Notes:(1) The book’s code must be unique in the list.(2) Display all books in format (code, title, quantity, price).(5)…
Draw the UML diagram for the class and then implement the class. For more details about UML diagrams see the “UMLNotation.pdf” by Y. Daniel Liang, located in LabFiles folder. Discuss:  Should the class Square have a main method? Use lab_02 as the name of this Java Application project.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education