Question: Consider the following code snippet: Employee anEmployee = new ProgrammerO; anEmployee. increaseSalary ( 2 5 0 0 ) ; Assume that the Programmer class inherits
Consider the following code snippet:
Employee anEmployee new ProgrammerO; anEmployee. increaseSalary;
Assume that the Programmer class inherits from the Employee class, and both classes have an implementation of the increasesalary method with the same set of parameters and the same return type. Which class's method is to be executed is determined by
the actual object type.
it is not possible to determine which method is executed.
the variable's type.
the hierarchy of the classes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
