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
Maslowich
3 years ago
9

For questions 19 - 21, assume that Student, Employee and Retired are all subclasses of Person, and all four classes have differe

nt implementations of the method getMoney. Consider the following code where ... are the required parameters for the constructors:
Person p = new Person(...);
int m1 = p.getMoney( ); // assignment 1
p = new Student(...);
int m2 = p.getMoney( ); // assignment 2
if (m2 < 100000) p = new Employee(...);
else if (m1 > 50000) p = new Retired(...);
int m3 = p.getMoney( ); // assignment 3

The reference to getMoney( ) in assignment 1 is to the class

Person
Student
Employee
Retired
this cannot be determined by examining the code
Computers and Technology
1 answer:
olga nikolaevna [1]3 years ago
3 0

Answer:

Person

Explanation:

At

Person p = new Person(...);

int m1 = p.getMoney( ); // assignment 1

Person class which is base class for all sub class (Student, Employee and Retired ) creates an object which referenced is stored in p variable, and  getMoney()  is method which refereed Person's getMoney() method, so Person is the answer of above question

You might be interested in
Class members are accessed via the ____(1)_____ operator in conjunction with the name of an object of the class, or via the ___(
Alborosie

Answer:

1.ClassName and . operator

2. ClassName and [] operator

Explanation:

There are two ways to get the members of a class first one is by using dot(.) operator.

Example : with assumption that person is a class object and age is the member in it we can use it as:

person.age

Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.

Example : person["age"]

5 0
3 years ago
What symbol is used for an assignment statement in a flowchart?
Annette [7]

Answer:

processing

Explanation:

The flow chart is a diagram that shows the activity of the program, peoples or things.

Flowchart symbol and meaning in the options:

1. Processing: it is a rectangular shape block which is used for variable declaration or assignment.

2. I/0: it is a parallelogram in shape which is used for input or output.

3. Parallelogram: it is used for input or output.

4. diamond: it is used for decisions or conditions.

Therefore, the correct option is a. Processing is the one that is used for the assignment statement.

3 0
3 years ago
Kate works for a film production company. One of her responsibilities includes handling the technical aspects of the camerawork
Katyanochek1 [597]

Answer:

cinematographer

Explanation:

Kate handles the technical aspects of the camerawork. The keyword is technical aspects. Therefore, she is more of a cinematographer than a camera operator. They sound like they can be interchanged, but not necessarily. The difference between the two roles is that a camera operator is more familiar with the camera equipment and is responsible for creating a plan of execution that requires technical skills. A Cinematographer, on the other hand, relies on the camera operator to film the shots. He/she is in charge of the actual shooting and is the one who decides on the aspects of how to light the scene or how the shot will be composed.

7 0
3 years ago
What is the best data type for traveling day?
kykrilka [37]
Here if its wrong sorry

7 0
2 years ago
HELP URGENTLY!!!!!
Ganezh [65]
Which field TCP header is not typically used in modern networks
5 0
3 years ago
Other questions:
  • Consider a set of mobile computing clients in a certain town who each
    13·1 answer
  • Which of the following are common problems experienced with software applications?
    15·1 answer
  • Convert the following numbers from decimal to binary, assuming unsigned binary representation:________.
    7·1 answer
  • What steps should Jeremy take to get himself motivated to study for the test?
    12·2 answers
  • Which of the following is a requirement for the Safety Data Sheet (SDS)?​
    5·1 answer
  • The _____ feature will mark all changes made to a document for others to review at a later time.
    13·1 answer
  • Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
    5·1 answer
  • Suppose you observe that your home PC is responding very slowly to information requests from the net. And then you further obser
    15·1 answer
  • Logan has developed an excellent presentation with interesting content. He received great feedback on the evaluation
    10·1 answer
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!