1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lukranit [14]
3 years ago
12

Book information (overriding member methods) Given main() and a base Book class, define a derived class called Encyclopedia. Wit

hin the derived Encyclopedia class, define a printlnfomethod that overrides the Book class printinfo() method by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces 261744 1399928 LAB ACTIVITY 11.17.1: LAB: Book information (overriding member methods) 0/10 File is marked as read only Current file: BookInformation.java 1 import java.util.Scanner; 3 public class BookInformation 2
Computers and Technology
1 answer:
IgorC [24]3 years ago
8 0

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());

   }

}

You might be interested in
ConnectWeb, Inc., an Internet service provider (ISP), supplies information to the Federal Trade Commission concerning possible u
Yuki888 [10]

Answer:

A Safe Harbor

Explanation:

ConnectWeb, Inc., an Internet service provider (ISP), supplies information to the Federal Trade Commission concerning possible unfair or deceptive conduct in foreign jurisdictions. For this disclosure, federal law gives ConnectWeb and other ISPs immunity from liability. This is a Safe Harbor.

5 0
4 years ago
What are the external parts of a computer system and which are output devices and which are input devices
cestrela7 [59]
I'd question the wording, However:

Monitor, Output device.
Keyboard, Input device.
Mouse, Input device.
Speakers Output Device.
Microphone, Input device.
Printer, Output device.
Scanner, input device.

Devices do not have to explicitly be one or the other e.g. a printer with a scanner, or headphones with a microphone.  
4 0
4 years ago
Jimmy and his friends are creating a rock band and have decided to turn his garage into a recording studio. He wants to sell the
irina [24]

I think the answer might be D

3 0
4 years ago
Read 2 more answers
Ethics in Al can contribute toward social progress and boost positive changes in society. Which aspect should be removed to achi
ivolga24 [154]

Answer: Hayaa~!

The answer is: . c. bias

Is known when someone purposefully biased an answer towards what they belive or think, this can be avoided by not asking them about topics that we firmly believe they are biased.

Explanation: I took the test

Hope this Helps

-Aaden<3

3 0
2 years ago
Łatwiej pokonać każdą trudność, gdy dąży się do swojego wymarzonego celu. Czy zgadzasz się z tym poglądem? W uzasadnieniu odwoła
Anna [14]

Answer:

Yes.

Explanation:

Your question is not clear. However, I inferred you need the clearer rendering of the question. It reads;

It is easier to overcome any difficulty when pursuing your dream goal. Do you agree with this view? In the justification, refer to compulsory reading and to another literary work.

6 0
3 years ago
Other questions:
  • A computer which links several pcs together in a network is called
    10·1 answer
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • Your laptop doesn���t have a serial port. what type of connector will your laptop require?
    5·2 answers
  • While designing your network's VLAN topology, your team has decided to use a centrally managed DHCP server rather than creating
    8·1 answer
  • Write a program that asks the user for a CSV of the NYC Open Data Film Permits: There is a sample file for June 2019 film permit
    9·2 answers
  • Which software application should be used when preparing a budget
    10·2 answers
  • You have an email that you are sending to a friend. You want to ensure it retains its integrity during transit, so you decide to
    5·1 answer
  • Martha wants to create an image for her Web site. Martha should use _____.
    15·2 answers
  • What is folded card publishing?​
    5·2 answers
  • Terrel is designing and maintaining a web page for a local company. In which career pathways would Terrel be involved?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!