public class Book { private String title; private String author;…

Question Answered step-by-step public class Book { private String title; private String author;… Image transcription text[CSE 007] Classwork: Method Overriding Assigned: 25 April2022 Objective: In this activity, you will continue implementinginheritance and have practice overriding methods. S… Show more… Show moreImage transcription textThe expected output would be: Book Information : Book Title:The Hobbit Author: J. R. R. Tolkien Publisher: George Allen &Unwin Publication Date: 21 September 1937 Book Inf… Show more… Show morepublic class Book { private String title;private String author;private String publisher;private String publicationDate; public void setTitle(String userTitle) {title = userTitle;} public String getTitle(){return title;} public void setAuthor(String userAuthor) {author = userAuthor;} public String getAuthor() {return author;} public void setPublisher(String userPublisher) {publisher = userPublisher;} public String getPublisher() {return publisher;} public void setPublicationDate(String userPublicationDate) {publicationDate = userPublicationDate;} public String getPublicationDate() {return publicationDate;} public void printInfo() {System.out.println(“Book Information: “);System.out.println(” Book Title: ” + title);System.out.println(” Author: ” + author);System.out.println(” Publisher: ” + publisher);System.out.println(” Publication Date: ” + publicationDate);}} import java.util.Scanner; public class BookInformation {private static Book[] books = new Book[10]; // will hold the book objects as entered by the userprivate static Encyclopedia[] encyclopedias = new Encyclopedia[10]; // will hold the encycolpedia objects as entered by the usersprivate static int numBooks = 0, numEncyclos = 0; // keep count of books and encyclopedias respectivelyprivate static Scanner scnr = new Scanner(System.in); //use one scanner for the entire class public static void main(String[] args) {boolean run = true;do {System.out.println(“Type B to enter a Book, E to enter an Encyclopedia, or anything else to be done”);char userChoice = Character.toUpperCase(scnr.nextLine().charAt(0));if (userChoice == ‘B’) {getBook(); // a method to read in user information in order to create  new Book object to// be held in the books array} else if (userChoice == ‘E’) {getEncyclopedia(); // a method to read in user information in order to create  new Encyclopedia// object to be held in the encyclopedias array} else {run = false;}} while (run && (numBooks<10||numEncyclos<10)); printInfoAll(); // a method to print information for the books objects then the encyclopedia// objects. }//precondition: there are two arrays (books and encyclopedias) that may or may not be filled//postcondition: after displaying all books and encyclopedias using the printInfo() methods from both classespublic static void printInfoAll() { } //precondition: there is an array of book objects that has been declared globally//postcondition: there will be a new book object created and saved into the next available element in books using information from the user,//also, numBooks will be incremented (don't forget to make sure that books isn't full)public static void getBook() { }//precondition: there is an array of encyclopedia objects that has been declared globally//postcondition: there will be a new encyclopedia object created and saved into the next available element in encyclopedias using information from the user,//also, numEncyclos will be incremented (don't forget to make sure that encyclopedias isn't full & verify )public static void getEncyclopedia() { }} please finish Encyclopedia.java, BookInformation.javaplease follow all requirements as shown above Computer Science Engineering & Technology Java Programming CSE 007 Share QuestionEmailCopy link Comments (0)