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
For the PSoC chip what is the minimum voltage level in volts that can be considered to logic one?​
gulaghasi [49]

Answer:

Asian man the man is one 1⃣ in a and the perimeters are not only

8 0
3 years ago
. What year did the USA host World Cup? Right answer 1994
Ksivusya [100]

Answer:

USA host World Cup in 1994 1994 FIFA World Cup

Explanation:

USA host World Cup in 1994 FIFA World Cup

it was the 15th edition of FIFA World Cup

and Brazil was won the tournament

Brazil beat Italy by 3–2 in  penalty shoot-out

it was play between 17 June to 17 July and 24 team play this World Cup

and there matches played = 52

and 9 cities host this game

United States of America was chosen as the host by FIFA on the 4 July, 1988

5 0
3 years ago
g Write a program that allows a user to input any text in your program. Using the tools that we have discussed, your program sho
Paladinen [302]

Answer:

Explanation:

The following function/program is written in Java. It asks the user for a sentence as an input and then splits that sentence into an array of words. Then it creates an arrayList for all of the unique words, comparing each word in the sentence with all of those in the ArrayList. If a word is found in the ArrayList it cancels the loop and moves on the next word in the sentence. Finally, it counts all of the unique words in the ArrayList and prints that total to the screen.

public static void uniqueWords() {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a sentence:");

       String sentence = in.nextLine();

       String words[] = sentence.split(" ");

       ArrayList<String> uniqueWords = new ArrayList<>();

       for (int x = 0; x < words.length; x++) {

           boolean exists = false;

           for (int i = 0; i < uniqueWords.size(); i++) {

               if (words[x].equals(uniqueWords.get(i))) {

                   exists = true;

                   break;

               }

           }

           if (exists == false) {

               uniqueWords.add(words[x]);

           }

       }

       System.out.println(uniqueWords.size());

   }

5 0
3 years ago
How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
max2010maxim [7]

Answer:

It will have a negative effect on the quality of your work for sure.

Without being able to properly and easily read the text, you will not be able to distinguish between symbols that are similar... like "," vs "." or ';' vs ":" or "m" vs "n" or "I" vs "i", and so on.

You might not be able to see where a sentence stops and you'll keep reading, mixing up sentences and wonder why this is in the same sentence.

If you're dealing with a language with accents (like French or Spanish for example), you will not be able to distinguish the accents ("ê" vs "ë" for example).

5 0
4 years ago
Type the correct answer in the box. Spell all words correctly.
Sonja [21]

An AI algorithm helps you trust the solutions that are being provided by Al systems.

<h3>What is AI?</h3>

AI is an acronym for Artificial Intelligence which is also known as Machine learning (ML) and it can be defined as a subfield in computer science that's focused on the use of advanced computer algorithms and technology to develop a smart computer-controlled robot with the abilities to proffer solutions to complex problems.

In Computer technology, an Artificial Intelligence (AI) algorithm helps you trust the solutions that are being provided by Al systems.

Read more on Artificial Intelligence here: brainly.com/question/25523571

#SPJ1

7 0
3 years ago
Other questions:
  • How do say phone in French?
    10·2 answers
  • To create a small research essay (no more than 1 page) about coronavirus. You will need to have at least two sources and you wil
    15·1 answer
  • 14. Which now-established technology went through the “emerging” phase in the early 2000s and makes the sharing of ideas much ea
    7·1 answer
  • The ____ layer protocols are the rules for implementing end-user services provided by a network. Transport Application Physical
    11·1 answer
  • A statement that highlights an organization's key ethical issues and identifies the overarching values and principles that are i
    6·1 answer
  • A firm can survive and succeed in the long run if it successfully develops strategies to confront the _______________ that shape
    9·1 answer
  • The Android operating system was invented by ______.
    13·1 answer
  • What is the georgia connections academy administrative password? i want to install something.
    5·1 answer
  • Which of the following is NOT a font style?<br> Italic<br> Bold<br> Regular<br> Iconic
    10·2 answers
  • Given the tables PRODUCT (ProductID. Description. Cost) SUPPLIER (Supplier D. ContactName, Phone Number) as shown in the figure
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!