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
A(n) ____________________ key is a key that is not reused, but rather is only used once, thus improving security by reducing the
taurus [48]

Answer:

Computer Security

Explanation:

if referring to only to a computer, then it can be considered secure when the computer does what is is supposed to do and only what it is supposed to do, but in more modern times the definition has shifted from the computer to the information being processed

3 0
2 years ago
in python Write a program that prompts the user to enter a hex character and displays its corresponding decimal integer python
Archy [21]

Answer:

Here is some that I know. The code is below:

#accepting input hex_num=input() #checking if it is a number if(hex_num>='0' and hex_num<='9'):     #printing that number     print(hex_num) #checking

Explanation:

I hope this helps

8 0
3 years ago
Which of the following is a true statement about psychological tests administered by computers? computers make standardization e
Hitman42 [59]
Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
the true statement about psychological tests administered by computers is 
<span>most people find computerized tests to be difficult to understand. </span>
7 0
3 years ago
What are the total number of rows and columns on a worksheet?.
Margaret [11]

Answer:

1,048,576 rows

Explanation:

hahha cause im smart

3 0
2 years ago
Read 2 more answers
Write Java program to allow the user to input the amount of deposit, yearly interest rate (percentage), and income tax(percentag
Vedmedyk [2.9K]

Answer:

import java.util.Scanner;

public class num12 {

   public static void main(String[] args) {

       Scanner scr = new Scanner(System.in);

       System.out.println("Enter a Deposit Amount");

       double amt = scr.nextDouble();

       System.out.println("Income tax in percentage");

       double incomeTaxRate = scr.nextDouble()/100;

       System.out.println("Yearly interest rate:");

       double rate = scr.nextDouble();

       double intRate = rate/100;

       double interest = (amt*intRate)-(amt*incomeTaxRate);

       System.out.println("The Interest on "+amt+" at "+rate+"% after one year is "+interest);

   }

}

Explanation:

Find the sample output attached

Java's Scanner class is used to prompt and receive values for deposit amount, income tax rate and interest rate

The yearly interest is calculate by interest = (amt*intRate)-(amt*incomeTaxRate);

3 0
3 years ago
Other questions:
  • Being tired has very similar effects on the body as what
    7·1 answer
  • How many rows and columns does ms-excel 2007 have???
    10·1 answer
  • Which group on the sparkline tools design tab would you choose if you wanted to change the data source of the sparkline? (1 poin
    10·1 answer
  • What options of the hierarchical star topology within the ANSI/TIA-568-C allow the ability to move the workgroup switches closer
    7·1 answer
  • An organization is assigned a Class-C network 200.120.80.0 and wants to form subnets for its threedepartments: D1 (60hosts), D2
    7·1 answer
  • What are the names of the 3 main languages used for making websites
    10·1 answer
  • HELP ILL MARK BRAINLIETS!! What kind of statement is used to determine which path a program will take? priority statement
    8·2 answers
  • What will happen when you drag and drop a worksheet tab into another workbook WITHOUT holding the Ctrl key down?
    13·2 answers
  • Write a multi-way if statement that compares the double variable pH with 7.0 and makes the following assignments to the bool var
    11·1 answer
  • 2. The internet offers a great source of information; however, how are
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!