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
____ are systems in which queues of objects are waiting to be served by various servers
Ksju [112]

Answer: Queuing systems

Explanation:

We have  the queuing theory which gives us the in depth knowledge of queuing systems which helps us to predict the queue length and the waiting time at the respective nodes in an network. A group of queuing systems together constitute the queuing network. The queuing theory helps to cope with the demand of various services in an queuing network composed of queuing systems.

4 0
3 years ago
Suppose you want to delete an existing file from within Word. What would you do? A. Click on the File button, choose Recent, ope
koban [17]
The asnwer would be A
7 0
3 years ago
What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
3 years ago
This type of server spools documents and puts them in a queue.
Paraphin [41]

Print is the type of server that spools documents and puts them in a queue. Whenever you are printing multiple documents, it is the standard operation of the printer to prioritize those documents that came first and add to the queue the other documents waiting for printing.

4 0
3 years ago
IT ethics are rules, policies, or principles that guide the behavior of IT professionals.
Vadim26 [7]

Answer: true

Explanation: true

6 0
3 years ago
Other questions:
  • How to reply to text from unknown number?
    11·1 answer
  • Need this!!
    11·2 answers
  • Write a Python program to do the following: (a)Use a for loop and a random integer generator to generate 5 random integers in 1
    10·1 answer
  • How are IP addresses usually written?
    7·1 answer
  • Digital on a smart phone means the camera is actually zooming in on the photo itself not the subject that you are shooting true
    8·1 answer
  • What is the definition of a flowchart? *
    13·1 answer
  • If u play codm pls tell me ur username
    9·2 answers
  • A menu that appears when an object is clicked with the right mouse button is called a tool-tip help menu
    10·1 answer
  • Which native windows application allows you to access basic pc settings and controls such as system information, controlling use
    7·1 answer
  • Write the following short piece of code in python:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!