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
Whatis NOT a key factor while designing a website?
Vaselesa [24]

Answer: Complexity

Explanation: Web designing is referred as the designing of a web page for different purposes such as online business,etc. The most important factor is usability for the improvement in performance of any site and keeping it successful.

It should be user friendly so that interaction and understanding between user and web page can easy.Consistency is also a feature which ensure that web page opened in any browser should have similar quick working.

But there should be no complexity present in the web design which can cause misunderstand with the user and functioning.

7 0
3 years ago
50 POINTS! What can be viewed in the Tasks folder? Check all that apply.
Rom4ik [11]

1, 2, and 4 :))) good luck

6 0
3 years ago
Read 2 more answers
1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s
masya89 [10]

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

 Scanner in = new Scanner (System.in);

       System.out.print("Enter favorite color:");

 String word1 = in.next();

       System.out.print("Enter pet's name:");

 String word2 = in.next();

       System.out.print("Enter a number:");

 int num = in.nextInt();

       System.out.println("you entered: "+word1+" "+word2+" "+num);

   }

}

Explanation:

Using Java Programming language

  1. Import the Scanner class
  2. create an object of the scanner class
  3. Prompt user to enter the values for the variables (word1, word2, num)
  4. Use String concatenation in System.out.println to display the output as required by the question.

7 0
3 years ago
2. Because technology is always changing, there are new applications being developed constantly. (1 point)
Zepler [3.9K]
True because we need new tech
4 0
3 years ago
Read 2 more answers
When installing the latest version of Internet Explorer, a dialogue box pops up with a box checked telling you that Bing will be
meriva

Answer:

B) opt-out identify

Explanation:

To opt-out means refusing to or avoiding to accept unsolicited refers to  products or service information. In this caseyou are refusing to accept Bing as your default search provider

8 0
2 years ago
Other questions:
  • You can apply bold, italic, and underline styles to text. But why is it a good idea to use underline sparingly?
    13·2 answers
  • A manufacturer of machine tools creates a spreadsheet of tools and the cost for those. The spreadsheet has four fields: name of
    13·1 answer
  • Help what is a computer made from (computer class question)!!
    9·1 answer
  • Users of an access point share the transmission capacity of the access point. The throughput a user gets is called the ________.
    11·1 answer
  • Please hurry Arrange the steps of the engineering design process in the correct sequence.
    10·1 answer
  • Two categories of payroll deductions are required deductions and ___ deductions.
    9·2 answers
  • Lan is working on a project report that will go through multiple rounds of
    10·1 answer
  • State Whether the given statement are TRUE OR FALSE. 13X1=13
    10·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    15·1 answer
  • Please help me i’ll give you brainlist
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!