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
[30 points, will mark Brainliest] Which of the following is the lowest hexadecimal value? Explain why. Options to chose; F2, 81,
larisa86 [58]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

First, we need to convert these hexadecimal numbers into decimal numbers, then we can easily identify which one is the lowest hexadecimal.

The hexadecimal numbers are F2, 81, 3C, and 39.

F2 = (F2)₁₆ = (15 × 16¹) + (2 × 16⁰) = (242)₁₀

81 = (81)₁₆ = (8 × 16¹) + (1 × 16⁰) = (129)₁₀

3C = (3C)₁₆ = (3 × 16¹) + (12 × 16⁰) = (60)₁₀

39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀

The 39 is the lowest hexadecimal number among the given numbers.

Because 39 hex is equal to 57 decimal.

39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀

5 0
3 years ago
burger hut is trying to decide if it can receive money from the government for providing employees with insurance .
lawyer [7]

Answer:

A cell grows to its full size, The cell copies its DNA

have a great weekends, hopefully it was the right answer!

8 0
3 years ago
The dns server translates the URL into the IP address 8.8.8.8. What is the next step in the process?
geniusboy [140]

Answer:

The web browser sends an HTTP request to the IP address, the IP address then sends the content that are displayed by the browser

Explanation:

The process of converting the typed in URL to a displayed page is as follows;

1) The typed in URL is sent to a DNS recursor by the browser

2) The recursor gets the DNS record for the domain from the cache if the record is cached or when the DNS record for the domain is not cached, the recursor makes a requests to the DNS root from which the name of the TLD nameserver is received

3) The TLD nameserver is contacted by the resolver to obtain the authoritative nameserver's IP address

4) With the information, the resolver contacts the authoritative nameserver and obtains the domain's IP address for the domain the resolver contacts

5) The obtained IP address for the URL's domain is then sent to the browser by the resolver

6) An HTTP request is sent by the browser to the IP address and the data received by the browser from that IP address is rendered and seen as the page content.

6 0
2 years ago
What is network management?
melamori03 [73]
Network management is  a broad range of  functions including activities, methods, procedures and the  use of  tools to administrate,operate,and  reliably maintain computer network system.  <span />
3 0
3 years ago
Non-preemptive Shortest Job First (SJF) scheduling policy is not optimal if:
ivann1987 [24]

Answer:

The answer is A

Explanation:

Basically, Shortest job first (SJF) is a scheduling policy that selects jobs on queue for execution  within a short execution time.

From the definition of SJF above, it means that there are a lot of process on queue and the (SJF) job is to receive processes on queue to execute within a short execution time.

Therefore, if all the jobs or process arrives at the SJF at the same time, the SJF will forfeit one of its major purpose which is scheduling of jobs.

That will therefore not make Non-preemptive Shortest Job First (SJF) not function at its optimal point.

4 0
3 years ago
Other questions:
  • select three types of school which specifically emphasize learning through creativity, self expression, and play
    10·2 answers
  • A person painting his house dumps the unused paint on the ground. Which of the following resources will this most likely pollute
    14·1 answer
  • A high-angle shot is the same thing as a bird’s-eye shot. True False
    11·2 answers
  • What is the value of length after the code that follows is executed?int[][] nums = { new int [] {1, 2, 3},new int [] {3, 4, 5, 6
    8·1 answer
  • Where is line-of-sight Internet common?<br> In space<br> Outdoors<br> Inside<br> In businesses
    5·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • Suddenly, though, just as the procedure was about to be relayed to the astronauts, the pressure . . . the temperature . . . drop
    5·2 answers
  • How do you know if something is in the public domain
    5·1 answer
  • Which function would you use to make sure all names are prepared for a mailing label? TODAY UPPER PROPER LOWER
    11·1 answer
  • How is the architecture converted into software code? Elaborate the steps its passes through with help of examples / Diagram.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!