Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces
Exam 1: Introduction to Programming and the Java Language47 Questions
Exam 2: Programming Building Blocks- Java Basics57 Questions
Exam 3: Object-Oriented Programming, Part 1: Using Classes62 Questions
Exam 4: Introduction to Graphical Applications57 Questions
Exam 5: Flow of Control, Part 1: Selection68 Questions
Exam 6: Flow of Control, Part 2: Looping67 Questions
Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes78 Questions
Exam 8: Single-Dimensional Arrays63 Questions
Exam 9: Multidimensional Arrays and the Arraylist Class62 Questions
Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces61 Questions
Exam 11: Exceptions, and Input Output Operations77 Questions
Exam 12: Graphical User Interfaces Using Java FX89 Questions
Exam 13: Recursion59 Questions
Exam 14: An Introduction to Data Structures69 Questions
Exam 15: Running Time Analysis56 Questions
Exam 16: RGB Colors, Decimal Conversion, Java Naming, and Random Number Generation110 Questions
Select questions type
Why does Java provide a protected access modifier?
Free
(Multiple Choice)
4.7/5
(28)
Correct Answer:
D
An interface can contain one or more abstract methods.
Free
(True/False)
4.9/5
(39)
Correct Answer:
True
Assuming that class B inherits from class A and method foo belongs to class A, what do we mean by overriding method foo in class B?
Free
(Multiple Choice)
4.8/5
(46)
Correct Answer:
C
When is it determined which method is called when using polymorphism?
(Multiple Choice)
4.8/5
(37)
Typically, an abstract class is a class that is not completely implemented.
(True/False)
4.7/5
(45)
What keyword do we use in the class header that inherits from an interface?
(Multiple Choice)
4.7/5
(30)
To use polymorphism, the classes must be in a different hierarchy.
(True/False)
4.8/5
(38)
Overriding a method and overloading a method mean the same thing.
(True/False)
4.9/5
(43)
The following code will run without errors:
// Figure is an abstract class
Figure f = new Figure( );
(True/False)
4.8/5
(37)
An abstract class is declared to be abstract by including the __________ keyword in the class header.
(Short Answer)
4.8/5
(35)
_________ allows us to use the same method call for any object in a class hierarchy.
(Short Answer)
4.9/5
(33)
You have written a SavingsAccount class based on the BankAccount class in the textbook. You wish to instantiate a SavingsAccount object with a starting balance of $2,175.25. Theorize why you would need to provide an overloaded constructor for the SavingsAccount class.
(Essay)
5.0/5
(33)
The extends keyword specifies that the subclass inherits members of the superclass.
(True/False)
4.8/5
(39)
The interface concept is Java's way of implementing __________ inheritance.
(Short Answer)
4.7/5
(37)
When a class extends another class, the default constructor of the subclass automatically calls the default constructor of the superclass. This is called explicit invocation.
(True/False)
4.7/5
(33)
Showing 1 - 20 of 61
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)