answer.
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
Alex777 [14]
2 years ago
4

Consider the abstract superclass below: public abstract class Foo { private int a; public int b; public Foo(int aVal, int bVal)

{ ​ a = aVal; ​ b = bVal; } public abstract int calculate(); } Any concrete subclass that extends class Foo ________. Group of answer choices will not be able to access the instance variable a must implement a method called calculate Neither A nor B. Both A and B.
Computers and Technology
1 answer:
geniusboy [140]2 years ago
7 0

Answer:

The answer is "Option Both (A) and (B)."

Explanation:

In the given code an abstract class is defined, that contains two integer private method that is "a and b", and also defines a parameterized constructor, that uses above variable to hold the value, and at the last an abstract method "calculate" is defined.

This method is part of the abstract class, that means it defines outside the class, and this method doesn't use an instance of the class to access it, that's why option A and option B is correct and others were wrong.

You might be interested in
When a button is selected, the computer processes the code contained in the buttons ____ event procedure?
My name is Ann [436]
The event is called keypress, usually the code is referred to as callback.
6 0
2 years ago
Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the printAll() member method and a separate println()
vekshin1

Answer:

Following are the program in the java language  

public class Main // Main class  

{

   String courseStudentsname; // variable declaration  

   int age; // variable declaration  

   int ID; // variable declaration  

   Main() // default constructor

   {

courseStudentsname="Smith";//assign the values mention in the question              

       age=20;//assign the values which is mention in the question  

       ID=9999;//assign the values which is mention in the question    

   }

void printAll() // method definition of printAll()  

   {

      System.out.print("Name: " + courseStudentsname ); // display name

      System.out.print(", Age: " + age); // display age

      System.out.print(", ID: " + ID); // display id

   }

public static void main(String[] args) // main fuunction()

{

Main ob=new Main(); // create the object of Main class  

ob.printAll(); // calling the method printAll()

}

}

Output:

Name:"Smith, Age:20, ID:9999

Explanation:

Following are the description of program

  • Create a constructor of "Main" class and store the respective values of courseStudentsname,age and ID in that constructor .
  • create a method printAll() and print the respective values in the given format which is mention in the question by using   System.out.print method.
  • In the main function create an object of "Main" class i.e "ob".
  • Finally, call the printAll() method by using the object of Main class.

4 0
2 years ago
5. Many vehicles have indicator lights telling you when your
I am Lyosha [343]

Answer:

A.

Explanation:

The rest is nearly impossible to detect or not worth the time.

8 0
2 years ago
Read 2 more answers
___refers to self-acting or self-operating.
lisabon 2012 [21]

Answer:

do it to me watch this

Explanation:

trailing zeros in a whole number with no decimal shown are NOT significan

6 0
2 years ago
At which stage should James, a website designer, gather information about the website he wants to create, and at which stage sho
viva [34]
<h2>Answer: James should gather information in the <u><em>Learning</em></u> phase and begin the site’s coding in the <u><em>Development</em></u> phase.</h2>

8 0
2 years ago
Other questions:
  • What are the two most important network-layer functions in a datagram network? what are the three most important network-layer f
    7·1 answer
  • Mel is skilled in identifying the technical, economic, and organizational feasibility of software. In which phase of SDLC should
    13·1 answer
  • You are the IT security administrator for a small corporate network. Samuel Garcia (sgarcia) has been away on vacation and has f
    9·1 answer
  • A few of your employees have complained that their computers sometimes shut down spontaneously. You have noticed that these empl
    6·1 answer
  • Implement the function couple, which takes in two lists and returns a list that contains lists with i-th elements of two sequenc
    8·1 answer
  • You should see an error. Let's examine why this error occured by looking at the values in the "Total Pay" column. Use the type f
    14·1 answer
  • Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer
    7·1 answer
  • In the next five years there are expected to be over _____ unfilled jobs in the US in computer science.
    10·1 answer
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
  • A Security team is working with a client to evaluate the security of data and IT functions that are most critical to the operati
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!