Answer:
Explanation:
The Book class and BookInformation class was not provided but was found online. After analyzing both of these classes I have created the following code that grabs and overrides the printInfo() method in order to add and print the edition and number of volumes as well
public class Encyclopedia extends Book {
String edition;
int numVolumes;
public String getEdition() {
return edition;
}
public void setEdition(String edition) {
this.edition = edition;
}
public int getNumVolumes() {
return numVolumes;
}
public void setNumVolumes(int numVolumes) {
this.numVolumes = numVolumes;
}
public void printInfo() {
System.out.println("Book Information: ");
System.out.println(" Book Title: " + super.title);
System.out.println(" Author: " + author);
System.out.println(" Publisher: " + publisher);
System.out.println(" Publication Date: " + publicationDate);
System.out.println(" Edition: " + getEdition());
System.out.println(" Number of Volumes: " + getNumVolumes());
}
}