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
zhuklara [117]
3 years ago
5

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

nt() { System.out.print(x); } } 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 correctly redefines the method print of DClass?
(i) public void print() { System.out.print(x + " " + y); }
(ii) public void print() { super.print(); System.out.print(" " + y); }
Computers and Technology
1 answer:
Feliz [49]3 years ago
4 0

Answer:

Option (ii) is the correct option to the following code.

Explanation:

In the following code of the Java Programming Language, there is two print function after the set function then, we firstly set the value of x and print it through print function which is already declared then, we set the value of y through set function then, print the value of y through print function. So, that's why the following option is correct.

You might be interested in
According to the author. Consider diverse and various domains of programming languages and applications.
elixir [45]

Answer:

A system programming language has low - level features that allow a software interface to write in an external device. Some computer uses computer languages such as PL/S, PL/I. This is an example of System Programming or Language programming.

Explanation:

The system language is a language used for system programming such as writing system software, which requires different development approaches when compared with application software.

System programming is the activity of the computer system. The characteristic of system programming when application programming produces software is that application that provides services to create software platforms.                    

                     

5 0
3 years ago
What is an allocation unit?
sdas [7]
It is a unit of disk space allocation for files and directories. Hope this helps :) 
5 0
3 years ago
Alexandria works for a non-for-profit company that asks for donations to help the homeless people in her community. Recently the
irakobra [83]

Answer:

Option A.

Explanation:

7 0
3 years ago
WILL GIVE BRAINLIEST!! 20 PNTS!!
kirill [66]

Answer:

B :)

Explanation:

.........

3 0
3 years ago
Read 2 more answers
Will a debit card still work if i put stickers on it?
laiz [17]

Answer:

Explanation:

Yes, it may still be readable, but if they refuse to take it you have no ground to stand on. (If you obscure the signature, at least make sure the CVV is readable or reprinted on top.) The plastic covering should not interfere with the mag stripe.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Use the image below to answer this question.
    14·1 answer
  • Why are resources limited? Why can't we get everything all the time?
    12·1 answer
  • What role do career pathways play?
    11·2 answers
  • Yan wants to attract customers specifically searching on Google for Time-B-Gone, his company's unique office-support product. Hi
    12·1 answer
  • A _________ is the broadcast of various types of media over the web.
    10·2 answers
  • Charlie is taking his slide presentation to a meeting at a remote location. He saves his presentation as a package on a CD. Char
    15·2 answers
  • The design of a blog refers to:
    10·1 answer
  • Which view would you need to use to make changes to the design theme for the entire presentation?
    10·2 answers
  • What would give Lucy, an entry-level candidate, an edge over others while she seeks a programmer’s position? Lucy, an entry-leve
    11·1 answer
  • See the file attached!​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!