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
Your task is to develop a Tic-Tac-Toe (also called as “Noughts and Crosses”) game in Java using Swing. In this assignment, you are asked to implement a single-player version of the Tic-Tac-Toe game with easy-to-use graphical user interface (GUI). One player will be the user and the second player will be artificial intelligence (AI), namely, the computer. The entire procedure of the implementation has been split into three tasks with detailed description and explanation provided. By completing the three tasks, you will develop your own Tic-Tac-Toe game. Task 1: GUI ImplementationPlease implement a GUI satisfying the following requirements.• A menu bar with two buttons “Reset” and “Quit”. User can click the “Reset” button to restore the software to the initial status. User can software the game by clicking the “Quit” button;• The top pane is an information board to display username and present some basic guidance to the user about this game. The information board will also print out the…
Using the class diagram in the image below, create customer, car, and parking lot classes for an object-oriented parking system. Classes should contain properties and method implementations. Use java to write your code. Add some attributes and methods of your own not included inside the class diagram Include a 200-word write-up to describe your implementation details and add screenshots of your code and output
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)…
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