Question
Create a class hierarchy for a set of Books. Start with a Book class that includes fields for Title, Author (see below), and Number of
Create a class hierarchy for a set of Books. Start with a Book class that includes fields for Title, Author (see below), and Number of Pages. Include getters and setters for each field. Create an appropriate constructor for the Book class.
Create an Author class for use in the Books classes (think delegation). Include fields for Name, Address, and Email. Include getters and setters for each field and an appropriate constructor.
Create 3 subclasses of the Book class: Textbook, Novel, and Biography. Include a Grade Level field for Textbook, a Genre field for Novel (i.e. Romance, Sci-Fi, Mystery, etc.), and a Subject field for Biography (whom is the biography about?). Include getters and setters for all data fields and appropriate constructors for each class.
Create a class that allows a user to enter data for a set of books and authors. When the user is finished entering data, display a report to the user that presents the information entered.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started