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
kenny6666 [7]
4 years ago
10

Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a

printInfo() method 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

Computers and Technology
1 answer:
NemiM [27]4 years ago
7 0

Answer:    

Here is the Encyclopedia class:

public class Encyclopedia extends Book {   //class  Encyclopedia that inherits from class Book

  private String edition; //declare private member variable edition of type String  

  private int numVolumes;      //declare private member variable numVolumes of type int

  public void setEdition(String ed) {  //mutator method of class that sets the value of edition

     edition = ed;    }     //assigns the value of ed to edition member field

  public void setNumVolumes(int numVol) { //mutator method of class that sets the value of numVol

     numVolumes = numVol;    }  //assigns the value of numVolumes to edition member field

  public String getEdition() {  //accessor method to get the value of edition

     return edition;    }     //returns the current value of edition

  public int getNumVolumes() {  //accessor method to get the value of numVolumes

     return numVolumes;    }       //returns the current value of numVolumes

  public void printInfo() {  //method to print edition and number of volumes information on output screen

     super.printInfo();  // The super keyword refers to parent class Book objects. It is used to call Book method and to eliminate the confusion between Book class printInfo method and Encyclopedia printInfo  method

     System.out.println("   Edition: " + edition);  //prints edition info

     System.out.println("   Number of Volumes: " + numVolumes);    }  }  //prints number of volumes info

Explanation:

The explanation is provided in the attached document.

You might be interested in
Choose the web design factor from the drop-down menus that best represents each statement. A. Good web pages stick to the point,
Paladinen [302]

Choose the web design factor from the drop-down menus that best represents each statement.

Answer:

A. Good web pages stick to the point, do not have useless information, and showcase important information.

  • Useful content

B. The best websites clearly present a reason for the creation of the site.

  • Purpose

C. The best websites are pleasing to look at and make you want to click further through the pages.

  • Visually appealing

D. It is important for the web designer to understand the needs, interests, and technology level of the target web page visitor.

  • Audience

E. Good websites make it easy to navigate from one page to the other with relevant links in obvious places.

  • Easy to use
4 0
4 years ago
Instrument Air system that employ a standby header shall be permitted to have a simplex cooler and dryer. Where a standby header
Vinil7 [7]

The standby header is provide a check valve shall be installed to prevent backflow.

<h3>What is instrument air?</h3>

The phrase “Instrument Air” is a term that connote  a thoroughly clean supply of compressed air that is said to be very free from any kind of contaminations such as particles.

Note that a system often utilize instrument air for different kinds of pneumatic tools, also that of valves and electrical controls.

See full question below

Instrument Air system that employ a standby header shall be permitted to have a simplex cooler and dryer. Where a standby header is provided, a ___________ shall be installed to prevent backflow.

answer choices

one way valve

two way check valve

check valve

Isolation valve

Learn more about Instrument from

brainly.com/question/26219918

7 0
2 years ago
ENG103 DISCUSSION BOARD 6
amm1812
The proper citation for your course of study -computer related- is APA (American Psychological Association)  format. This citation format allows us to state the publication date, title , and authors in an organized and short fashion. All scholarly reports that are technology or psychology based, should be cited in APA format. 

<span>I know this because it is the format I use for all of my college courses which are all Computer/Technology related. </span>
3 0
3 years ago
How do ACLs work on a router?
serg [7]

Answer:

An ACL is a list of permit or deny rules detailing what can or can't enter or leave the interface of a router. Every packet that attempts to enter or leave a router must be tested against each rule in the ACL until a match is found. If no match is found, then it will be denied.

Explanation:

PLEASE MARK ME AS BRAINLIEST

6 0
3 years ago
How can migrating to an enterprise platform solution help a business improve employee productivity?
Lorico [155]

Answer:

By allowing all employees to access and share the same stored dats and by increasing the number of wmployees in business activities

Explanation:

#<em>carry on learning</em>

5 0
3 years ago
Other questions:
  • Which type of architecture places a firewall in front of the VPN to protect it from Internet-based attacks as well as behind a f
    6·1 answer
  • Which AWS service is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud?​
    9·1 answer
  • What feature is available to add a suggestion in the margin of someone else's document?
    7·1 answer
  • A router has just received the following new IP addresses: 88.62.108.0/21, 88.62.116.0/21, 88.62.120.0/21 and 88.62.128.0/21. If
    5·1 answer
  • Simple geometry can compute the height of an object from the the object's shadow length and shadow angle using the formula: tan(
    12·1 answer
  • Study the sentences below. A.Changing the properties of characters in a sentence or paragraph in a Word document helps increase
    5·2 answers
  • Draw the resistor’s voltage and current phasors at t=15ms. Draw the vectors with their tails at the origin. The orientation of y
    5·2 answers
  • Which type of formatting would you apply to spreadsheet data so that each cell is outlined?
    5·1 answer
  • What does a GPA show
    14·2 answers
  • Any computer expert to help me answer this question plz am giving brainliest
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!