Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 9: Inheritance
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
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?
Question 42
Multiple Choice
Consider the following code snippet: public class Vessel { ) . . Public void setVesselClass(double numberAxles) { ) . . } } Public class Speedboat extends Vessel { ) . . Public void setVesselClass(double numberAxles) { ) . . } } Which of the following statements is correct?
Question 43
Multiple Choice
Consider the following code snippet: public class Vehicle { ) . . Public void setVehicleClass(double numberAxles) { ) . . } } Public class Motorcycle extends Vehicle { ) . . Public void setModelName(String model) { ) . . } Public void setVehicleClass(double numberAxles) { ) . . } } Which of the following statements is NOT correct?
Question 44
Multiple Choice
If a subclass uses the same method name but different parameter types for a method that appears in its superclass, ____.
Question 45
Multiple Choice
Consider the following code snippet: public class Motorcycle extends Vehicle { Private String model; ) . . Public Motorcycle(int numberAxles, String modelName) { Super(numberAxles) ; Model = modelName; } } What does this code do?