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
olasank [31]
3 years ago
11

Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri

nt(){ } } public class DClass extends BClass { private int y; public void set(int a, int b) { //Postcondition: x = a; y = b; } public void print(){ } } Which of the following is the correct definition of the method set of the class DClass? (i) public void set(int a, int b) { super.set(a); y = b; } (ii) public void set(int a, int b) { x = a; y = b; }
Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

The answer to the given question is the option "(i)".

Explanation:

In this question, the correct option is the "(i)" because In this method definition we use the super keyword. It refers to the parent's class. In this method, we use the superclass to call the above (parent) class method. and if we choose the option (ii), It will not call the parent class. That's why we use the option (i) which is correct.

You might be interested in
You have deployed your Ethernet cable near a generator, whose heat is effecting the cable in a way that its energy is lost. If s
Naddik [55]

Answer:

0.7

Explanation:

Atenuation is the loss of power of a signal.

Attenuation = output power/input power

                   = 1.4/2

                  = 0.7

8 0
3 years ago
Designations at the end of file names such as .docx and .html are called
Amanda [17]

Answer:

Designations at the end of file names such as .docx and .html are called. File extensions.

Explanation:

7 0
3 years ago
Para que se utiliza openoffice en la vida cotidiana?
Mama L [17]
OpenOffice se utiliza para organizar y presentar los datos o la información de otra manera.

espero y te ayude! : )
3 0
3 years ago
Read 2 more answers
Is virtualization self monitoring
NISA [10]

Answer:

No

Explanation:

Virtual and physical metrics have to be collected and analysed to look for allocation problems such as: VM sprawl, too many VMs, or improperly provisioned VMs are occurring.

4 0
3 years ago
Can you give me a long list of kid's cartoons
notka56 [123]
Gravity Falls
Adventure Time 
SpongeBob SquarePants,
Cailou 
Bubble Guppies
Dora
Teletubbies
4 0
3 years ago
Read 2 more answers
Other questions:
  • Where is the insert function button found in microsoft excel?
    11·1 answer
  • A company that hires only American Indians is practicing
    5·2 answers
  • Which is an advantage the electronic scheduling tools have over paper calenders?​
    11·1 answer
  • If in your checkout cart right before you buy something there is an option saying "this order contains a gift." on amazon, what
    7·1 answer
  • What are the two basic steps in communication
    9·1 answer
  • How can you add and remove categories from a previously created chart? A. Click the Format tab. B. Click the Chart Styles button
    13·2 answers
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    12·1 answer
  • What is the cell membrane used for ​
    14·2 answers
  • Whoever answers first gets lots of points
    14·2 answers
  • What is computer code?<br> A. Java Script<br> B. XML<br> C. HTML<br> D. Any programming language
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!