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
Lubov Fominskaja [6]
2 years ago
15

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 & Unwin
21 September 1937
The Illustrated Encyclopedia of the Universe
James W. Guthrie Watson-Guptill
2001
2nd
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
Computers and Technology
1 answer:
alexandr1967 [171]2 years ago
8 0

Answer:

..

Explanation:

i dont really know. I am just answering for the sake of points lol

You might be interested in
A program that contains the following method: public static void display(int arg1, double arg2, char arg3) { System.out.println(
Oduvanchick [21]

Answer:

The method can be accessible from main method of any class.

Explanation:

Main method is the entry point of a program, which means when you start you program the first thing to execute is the main method.

public static void main(String[] args){

// Your code here

}

In the given display method you have int, double and char data types as a arguments. So in order to call display method you need to understand the datatype that you want to pass.

int only takes integers without decimal points.

double take numbers with decimal points.

and char only tak one character

so in order to call display method we need to pass those arguments in right order.

Below is the main method which will call the display method in a right way

public static void main(String[]args){

  display(25,50000.00,'T');

}

Output

The values are 25, 50000.0, and T

7 0
2 years ago
3) Write a program named Full_XmasTree using a nested for loop that will generate the exact output. This program MUST use (ONLY)
N76 [4]

Answer:

Following are the code to this question:

//import package

import java.util.*;  

public class Full_XmasTree   //defining class

{        

// defining main method

public static void main(String as[])  

   {  

       int X,a,b; //defining integer variable

       Scanner obx = new Scanner(System.in); // creating Scanner class object

       System.out.print("Please enter: "); //print message

       X = obx.nextInt(); // input value from user

       for (a = 0; a < X; a++) //defining loop to print pattern  

       {

           for (b = X - a; b > 1; b--)//use loop for print white space  

           {

           System.out.print(" ");//print space

           }

           for (b = 0; b <= a; b++) // use loop to print values  

           {

               System.out.print("* "); //print asterisk values

           }

           System.out.println(); //using print method for new line

       }

   }

}

Output:

please find the attachment.

Explanation:

In the given java code, a class "Full_XmasTree" is declared, in which the main method is declared, inside this method three integer variable "X, a, and b", in this variables "a and b" is used in a loop, and variable X is used for user input.

  • In the next line, the Scanner class object is created, which takes input in variable X, and for loop is used to print asterisk triangle.
  • In the first for loop, use variable a to count from user input value, inside the loop, two for loop is used, in which first is used to print white space and second is used for the print pattern.

8 0
3 years ago
Two parter:
sashaice [31]

Answer:

This is an infinite loop.

Explanation:

The while loop while never end since the last statement inside the while loop will continue to decrement the value of num by 1 and the condition num < 9 will always be true.

So either change the condition of the while loop like: num > -9

or start incrementing the variable num in the last statement of the while loop like:

num = num + 1

Note: Don't make both changes at the same time.

Visit: gotit-pro.com for fastest, top-notch and impeccable homework and exams help in a range of subjects and ace your academics.

Thanks and Best Regards: Your Friendly Study Co-Pilot

6 0
2 years ago
What is the difference between a Is your Milling machine and grinding machine
Law Incorporation [45]

Answer:

one is used for milling and one is used for grinding

Explanation:

8 0
2 years ago
The true or false questions.
tankabanditka [31]

Answer:

false

Explanation:

-exec option is not mandatory for the find command.

find will still list out the identified files even in the absence of -exec option.

For example:

find . -name test -print

will print out files with the name 'test' in the current directory. Note that there is no exec option in this example.

Same holds true for find with no additional options at all.

For example:

find .

will list out all files in the current directory.

3 0
3 years ago
Other questions:
  • Which innovation allowed for the mass production of goods? A. Cotton gin B. Sewing machine C. Industrial lubricator D. Interchan
    6·1 answer
  • How is it possible to find encyclopedias and reference texts on the internet
    11·2 answers
  • A computer has 9850 processes and 172 of them where suspended while 276 were terminated.,explain why some of the processes where
    15·1 answer
  • To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then y
    6·1 answer
  • Matt is a senior developer for Cyber Protect, a company that helps secure management information systems. Matt's new task is to
    8·1 answer
  • Many languages do not use the characters of U.S. English. Suppose you wanted to be able to
    15·1 answer
  • A friend asks you for help writing a computer program to calculate the square yards of carpet needed for a dorm room. The statem
    15·1 answer
  • What do you think that the next version of IR (IR 5.0) will bring if it was discovered in near future? (hint:- advance IR 4.0 fe
    8·1 answer
  • You’re investigating an internal policy violation when you find an e-mail about a serious assault for which a police report need
    7·1 answer
  • Identify the network and the host address in the ip address of 12.128.120.131 with a subnet mask of 255.128.0.0.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!