Solved

Consider the Following Code Snippet: If the Programmer Class

Question 29

Multiple Choice

Consider the following code snippet: Consider the following code snippet:   If the Programmer class inherits from the Employee class, and only the Employee class has an implementation of the increaseSalary method, which statement is correct?  A) The increaseSalary method call will cause a run-time error. B) The increaseSalary method of the Employee class will be executed. C) The Programmer class is required to provide an implementation of the increaseSalary method. D) Programmer objects must be cast to Employee objects before the method call can me made. If the Programmer class inherits from the Employee class, and only the Employee class has an implementation of the increaseSalary method, which statement is correct?


A) The increaseSalary method call will cause a run-time error.
B) The increaseSalary method of the Employee class will be executed.
C) The Programmer class is required to provide an implementation of the increaseSalary method.
D) Programmer objects must be cast to Employee objects before the method call can me made.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions