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
Which of the options listed will happen if the following code segment is run, assuming the remainder of the program is coded correctly?
10 public class Circle extends Figure
11 {
12 private int radius;
13 public Circle( )
14 {
15 super( );
16 radius = 0;
(Multiple Choice)
4.8/5
(32)
Private fields and methods are part of the inheriting class object.
(True/False)
4.9/5
(32)
If the call to the direct superclass constructor was not the first statement in the constructor, a compiler error will be generated.
(True/False)
4.9/5
(40)
Usually, an abstract class contains at least one abstract method.
(True/False)
4.7/5
(50)
Which Java keyword do we use in the constructor of a class inheriting from another class if we want to call the constructor of the inherited class?
(Multiple Choice)
5.0/5
(37)
If a class has an abstract method, then that class must be declared abstract.
(True/False)
4.8/5
(31)
Some OOP developers call a subclass the base class and call a superclass the derived class.
(True/False)
4.8/5
(40)
Typically, an abstract class is a class that is not completely implemented.
(True/False)
4.9/5
(41)
A method in a subclass overriding a method in a superclass cannot call the superclass method.
(True/False)
4.7/5
(32)
The extends keyword specifies that the subclass inherits members of the superclass, so:
(Multiple Choice)
4.8/5
(45)
Several classes implement an interface, but all of them implement the same method using the same code. To provide a common method for all of these classes, you would create an abstract class.
(True/False)
4.9/5
(30)
Suppose you write a program in which you attempt to use a subclass to directly access a private password field in a superclass. Predict what will happen, and suggest a solution that would result in a different outcome.
(Essay)
4.9/5
(39)
Showing 21 - 40 of 61
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)