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
Reika [66]
3 years ago
14

Create a class called Jack that extends Leo. This class must have the following behaviors/methods. You must use the inheritance

to reuse the methods from the parent classes. Solution without using the inheritance will get zero points. re-writting the code that already exists will get zero credit. A call to the methods in the parent classes must be donemethod description
method1 display "Jack 1 Leo 1 "
method2 displays "Don 2 Jack 2"
method3 displays "Jack 3 Leo 3 Don 2 "
toString displays" Jack 3 Leo 1"
Computers and Technology
1 answer:
lara [203]3 years ago
8 0

Answer:

public class Leo{

public String method1(){

return "Jack 1 Leo 1";

}

public String method2(){

return "Don 2 Jack 2";

}

public String method3(){

return "Jack 3 Leo 3 Don 2";

}

public String toString(){

return "Jack 3 Leo 1"

}

}

public class Jack extends Leo{

}

Explanation:

Leo is the parent class and jack inherits all of its attributes from Leo

So when you call the following code in the main method:

Jack j = new Jack();

System.out.println(j.method1);

it should print Jack 1 Leo 1

This is because the program first checks if method 1 exists in the Jack class

Because it doesn't exist it then goes to the parent class which is Leo.

And in the Leo class method1 displays "Jack 1 Leo 1 "

So it prints that

You might be interested in
Edhisive 3.5 code practice
Amanda [17]

Answer:

x = int(input("What grade are you in? "))

if (x == 9):

   print ("Freshman")

elif (x == 10):

   print("Sophomore")

elif (x == 11):

   print ("Junior")

elif (x == 12):

   print("Senior")

else:

   print ("Not in High School")

Explanation:

7 0
2 years ago
You learn Structured System Analysis and Design as a course in your department.List down some of the contribution of this course
AURORKA [14]

Answer:

There are a variety of legal types of organizations, including corporations, governments, non-governmental organizations, political organizations, international organizations, armed forces, charities, not-for-profit corporations, partnerships, cooperatives, and educational institutions etc.

Explanation:

Management is the process of guiding the development, maintenance, and allocation of resources to attain organizational goals. Managers are the people in the organization responsible for developing and carrying out this management process. Management is dynamic by nature and evolves to meet needs and constraints in the organization’s internal and external environments.

5 0
2 years ago
Which of the following is not a component of Google Display ads' value proposition?
Evgesh-ka [11]

Answer:

D. Search.

Explanation:

Google search engine is a engine used in browsers to seek of information related to the search values inputted by the user. This search engine is used in varieties of browsers like google chrome, mozilla firefox, phoenix etc, this is because it has a wide range of Google community web servers to get information.

Google Display ads value proposition is an advertising platform that takes advantage of the enormous google community on the internet of advertise client products and services across thousands of websites.

It uses the intent of the costumer, machine learning and performance of a website to advertise products, it does not need a search component since it is advertised automatically on an active website.

6 0
3 years ago
How to check the speed of your internet connection on macbook air
Oliga [24]

Answer:

Speedtest . net is the most used one.

4 0
3 years ago
Dave and Kirk are learning about electromagnetic waves in class. Dave says that gamma rays are the most dangerous because they c
katen-ka-za [31]

I’d say A: Dave is partly right in his answer that gamma rays are the most dangerous, but it is because of their frequency and wavelength, not where they come from.

Gamma rays are the most intense and thus, most harmful electromagnetic waves. Gamma rays radiation poisoning is difficult to shield against. These rays have the most energy and can go through six feet of concrete and damage your DNA as well. The higher the energy waves (gamma, x-ray), the shorter the wavelengths

7 0
3 years ago
Other questions:
  • convert the following c code to mips. assume the address of base array is associated with $s0, n is associated with $s1, positio
    14·1 answer
  • Under which key category do the Page Up and Page Down keys fall?
    10·2 answers
  • Which of the following techniques would a Baroque composer most likely employ to evoke an affect of agitation? Select one:
    14·1 answer
  • All systems have ___________.
    9·2 answers
  • What does a virus do to a computer? How can it be fixed?
    9·1 answer
  • Explain what the hazard detection unit is doing during the 5th cycle of execution. Which registers are being compared? List all
    6·1 answer
  • What is information technology?
    9·1 answer
  • What does input allow a computer to do
    14·1 answer
  • I need subscribers plz ​
    15·2 answers
  • What's the commission payout for auto bill pay if sold with a ga?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!