Multiple Choice
Consider the following code snippet: public class Employee
{
) . .
Public void setDepartment(String deptName)
{
) . .
}
}
Public class Programmer extends Employee
{
) . .
Public void setProjectName(String projName)
{
) . .
}
Public void setDepartment(String deptName)
{
) . .
}
}
Which of the following statements is NOT correct?
A) The Programmer class can call the setDepartment method of the Employee class.
B) The Employee class can call the setProjectName method.
C) The Programmer class's setDepartment method overrides the Employee class's setDepartment method.
D) The Programmer class can call the setDepartment method of the Programmer class.
Correct Answer:

Verified
Correct Answer:
Verified
Q3: Consider the following code snippet: public class
Q16: Consider the following code snippet: double salary
Q18: The _ reserved word in a class
Q19: Consider the following code snippet: public abstract
Q23: You are creating a Motorcycle class that
Q24: To override a superclass method in a
Q25: Consider the following code snippet: public class
Q75: Which of the following is true regarding
Q82: Which of the following indicates that a
Q94: What must a subclass do to modify