Solved

Consider the Following Code Snippet: If the Programmer Class

Question 65

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents