44,385 views
5 votes
5 votes
Design and implement a set of classes that define various types of reading material: books, novels, magazines, technical journals, textbooks, and so on. Include data values that describe various attributes of the material, such as the number of pages and the names of the primary characters. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes.

User Leo Ma
by
3.3k points

1 Answer

1 vote
1 vote

Answer:

Following are the code to this question:

please find the attached file.

Step-by-step explanation:

In this code, four class "novels, magazines, technical journals, and textbooks", is defined, in which it holds their respective default constructor and the get and set method to hold the string and integer value, and in the book class the main method is defined, that creates its object and a switch to for search value and print its value.

Design and implement a set of classes that define various types of reading material-example-1
User Komal Bansal
by
3.2k points