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
Get step-by-step solutions from verified subject matter experts
