Question: Create a Java program named Book.java with the following code. public class Book { private String publisherName; public void setPublisherName (String manufacturerName) { this. publisherName

Create a Java program named Book.java with the following code.

public class Book {

private String publisherName;

public void setPublisherName (String manufacturerName) {

this. publisherName = publisherName;

}

public String getPublisherName () {

return publisherName;

}

}

Then, create a program (within the same package) named Novel.java that inherits Book. Novel has its own private member variables named authorName with its mutator and accessor. Lastly, create a test program (test.java) to assign and display the publisherName and authorName.

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!