Question: Java programming 1) Create a class ReadingMaterial 2) Create a subclass of ReadingMaterial called Newspaper - should call superclass constructors Be sure to include JavaDocs

Java programming

1) Create a class ReadingMaterial

2) Create a subclass of ReadingMaterial called Newspaper - should call superclass

constructors

Be sure to include JavaDocs

----------------------------------------------------------------------------------------

Java programming 1) Create a class ReadingMaterial 2) Create a subclass of

using above UML please make java programming....

(these are my code I made little bit)

public class ReadingMaterial {

/*

* constructor for class ReadingMaterial

*/

public ReadingMaterial(){

System.out.println();

System.out.println("ReadingMaterial constructor called");

}

/*

* Display Method

*/

public void display(){

System.out.println("Display method of Reading Material is called");

}

}

-----------------------------------------------------------------------------

public class Newspaper extends ReadingMaterial{

/*

* constructor for class Newspaper and class its parent class constructor

*/

public Newspaper(){

super();

System.out.println("News Paper constructor called");

System.out.println();

}

/*

* Display Method

*/

public void display(){

System.out.println("Display method of NewsPaper is called");

}

-----------------------------------------------------------------------------------

ReadingMaterial language String publisher: String ReadingMaterial (publisher: String, language:String) getLanguage (void): String setLanguage (String) void getPublisher(void): String SetPublisher (String): void toString(): String Newspaper name: String size: Rectangle |numPages int NewsPaper publisher: string, tring, size:Rectangle, numPages:int) getName(): String getSize() Rectangle getNumPages(): int setName (String) void setSize(Rectangle) void setNumPages (int) void toString String Shouild never be instantiated Set default for language Default: English ReadingMaterial

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!