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
Allison, a very close friend of yours, is about to give a presentation to the class. You know that she has procrastinated and is
Contact [7]

C is the right thing to do.

4 0
4 years ago
Read 2 more answers
"Currency" is a field data type ,it represents Date or time values<br> True or false tho?
trapecia [35]

Answer:

true

Explanation:

6 0
3 years ago
What is the first step of viewing a web page as described in the video?
Sonja [21]

Answer:

URL

Explanation:

The order is URL, request, response, then render

4 0
3 years ago
After saving the changes she made, Sally notices that she used the word "home” too many times in her paragraph. She decides to m
Natasha_Volkova [10]

Answer:

c or a there both correct

Explanation:

8 0
3 years ago
The Fed: decreases the money supply when the economy contracts. performs banking services for commercial banks in districts wher
Slav-nsk [51]

Answer:

performs banking services for commercial banks in districts where it operates.

Explanation:

The Federal Reserve System ( popularly referred to as the 'Fed') was created by the Federal Reserve Act, passed by the U.S Congress on the 23rd of December, 1913. The Fed began operations in 1914 and just like all central banks, the Federal Reserve is a United States government agency.

Generally, it comprises of twelve (12) Federal Reserve Bank regionally across the United States of America.

Hence, the Fed performs banking services for commercial banks in districts where it operates, as well as providing services to the general public.

4 0
3 years ago
Other questions:
  • Array elements must be ________ before a binary search can be performed.
    8·1 answer
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    7·2 answers
  • Why do local variables lose their values between calls to the function in which they are
    5·1 answer
  • Write code that inserts useritems into the output string stream itemsoss until the user enters "exit". each item should be follo
    15·1 answer
  • When deciding how to invest your money, which of the following is least important to know
    7·1 answer
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • What software could i use to create music like Aphex Twin?
    6·1 answer
  • Ok who tryna play zombs royale
    7·1 answer
  • I WILL GIVE BRAINLIST THING TO WHOEVER GIVES ME THE CORRECT ANSWER
    11·1 answer
  • Your task is to design a method int[] allMatches(int[] values, int size, int a, int b) that returns all values between a and b i
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!