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
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(),…
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