Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help in java will like Given maind and a base Book class, define a derived class called Encyc Lopedia with member methods to get

please help in java will like image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Given maind and a base Book class, define a derived class called Encyc Lopedia with member methods to get and set private fields of the following types: - String to store the edition - int to store the number of pages Within the derived Encyclopedia class, define a printinfo0 method that overrides the Book class printinfo0 method by printing the titie, author, publisher, publication date, edition, and number of pages. Ex. If the input is: The Hobblt J. R. R. Tolkien George Allen 6 Unwin 21 September 1937 The Illustrated Encyelopedia of the Univerve Ian Ridpath ation-Gupt111 2001 2nd 384 the oulput is Fle is marked as read only Current file: Bookinformation.java - File is marked as read only Current file: Bookinformation.java - 161718192021222324252627282930publisher=scnr.nextLine();publicationDate=scnr.nextLine();eTitle=scnr.nextline();eAuthor=scnr.nextline();ePublisher=scnr.nextline();ePublicationDate=scnr.nextLine();edition=scnr.nextLine();numPages=scnr.nextInt();myBook.setTitle(title);myBook.setAuthor(author);myBook.setPublisher(publisher);;myBook.setPublicationDate(publicationDate);myBook.printInfo(); myEncyclopedia. setTitle(eTitle); myEncyclopedia. setAuthor(eAuthor); myEncyclopedia. setPublisher(ePublisher); myEncyclopedia.setPublicationDate(ePublicationDate); myEncyclopedia.setEdition(edition); myEncyclopedia.setNumPages(numPages); myEncyclopedia.printInfo(); \} File is marked as read only Current file: Book.java - File is marked as read only Current file: Book.java - Current file: Encyclopedia.java

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

=+Is it possible that there is an ace in the hand?

Answered: 1 week ago

Question

Recount the fundamental assumptions of the muted group theory

Answered: 1 week ago

Question

Compare and contrast monochronic and polychronic time orientations

Answered: 1 week ago

Question

Compare and contrast cultural preferences for privacy

Answered: 1 week ago