Question: This is a Java Programming. -> Create a class ReadingMaterial. b) Create a subclass of RM called Newspaper - should call superclass constructors. c) Create

This is a Java Programming.

-> Create a class ReadingMaterial.

b) Create a subclass of RM called Newspaper - should call superclass constructors.

c) Create a subclass of RM called Manga - should call superclass constructors.

d) Create a subclass of RM called Book - should call superclass constructors.

-> Create a class Book.

a) Create a subclass of Book called Textbook - should call superclass constructors.

b) Create a subclass of Book called Novel - should call superclass constructors.

-> Create a class ReadingFactory. ReadingFactory should create a newspaper, a manga, a textbook and a novel.

a) ReadingFactory should contain a method that demonstrates polymorphism by displaying the object sent to it. b) ReadingFactory should have an arraylist of all the instantiated objects - sort the collection, and then use the display method. c) Demonstrate casting an object back to its original data type (e.g. cast a ReadingMaterial back to a Novel.)

8) Be sure all methods and JavaDocs included.

=============================================================================================

ReadingMaterial Should never be instantiated.

- language: String

- publisher: String

+ ReadingMaterial(publisher: String, language: String) Set default for language.

+ getLanguage (void): String

+ setLanguage (String): void Default: English

+ setPublisher (String): void

+ getPublisher (void): String

+ toString(): String

===========================================================================================

Book ReadingMaterial

- name: String title

- author: String

- size: Rectangle

- numPages: int

- ISBN: String

+ Book (name: String, author: String, size: Rectangle, numPages: int, ISBN: String)

+ getName(): String

+ getSize(): Rectangle.

+ getNumPages() : int

+ getAuthor(): String + setName(String) : void + setSize(Rectangle) : void + setNumPages(int) : void + setAuthor(String) : void + getISBN() : String + setISBN(String) : void + toString() : String

===============================================================================================

TextBook Book

- subject: String - course : String + TextBook(name:String, author: String, size:Rectangle, numPages:int, ISBN: String, subject: String, course: String) + setSubject(String) : void + setCourse(String): void + getSubject() : String + getCourse() : String + toString() : String

==============================================================================================

Novel Book

- genre: String + Novel(name:String, author: String, size:Rectangle, numPages:int, ISBN: String, genre: String) + setGenre(String) : void + getGenre() : String + toString() : String

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!