Exam 9: Inheritance
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
When a subclass overrides a superclass method, only the subclass's version of the method can be called with a subclass object.
(True/False)
4.8/5
(43)
When an "is a" relationship exists between objects, it means that the specialized object has all the characteristics of the general object plus additional characteristics that make it special.
(True/False)
4.7/5
(38)
In a UML diagram you show a realization relationship by connecting a class and an interface with a
(Multiple Choice)
4.9/5
(38)
Because the subclass is more specialized than the superclass, it is sometimes necessary for the subclass to replace inadequate superclass methods with more suitable ones.
(True/False)
4.8/5
(33)
When a class contains an abstract method, you cannot create an instance of the class.
(True/False)
4.8/5
(40)
A class becomes abstract when you place the __________ key word in the class definition.
(Multiple Choice)
4.8/5
(36)
If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method.
(True/False)
4.8/5
(35)
Which of the following statements correctly specifies two interfaces?
(Multiple Choice)
4.8/5
(29)
In __________, inheritance is shown with a line that has an open arrowhead at one end that points to the superclass.
(Multiple Choice)
4.8/5
(37)
Which of the following statements declares Salaried as a subclass of PayType?
(Multiple Choice)
5.0/5
(35)
In Java, a reference variable is __________ because it can reference objects of types different from its own, as long as those types are related to its type through inheritance.
(Multiple Choice)
4.8/5
(40)
In object-oriented programming, __________ allows you to extend the capabilities of a class by creating another class that is a specialized version of it.
(Multiple Choice)
4.8/5
(42)
What type of relationship exists between two objects when one object is a specialized version of another object?
(Multiple Choice)
4.7/5
(28)
A(n) __________ method is a method that appears in a superclass but expects to be overridden in a subclass.
(Multiple Choice)
4.7/5
(39)
In the following statement, which is the superclass? public class ClassA extends ClassB implements ClassC
(Multiple Choice)
4.9/5
(33)
Which key word indicates that a class inherits from another class?
(Multiple Choice)
4.8/5
(40)
When a method is declared with the __________ modifier, it cannot be overridden in a subclass.
(Multiple Choice)
4.8/5
(40)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)