Exam 7: Inheritance
Exam 1: Getting Started45 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control44 Questions
Exam 4: Defining Classes I45 Questions
Exam 5: Defining Classes II46 Questions
Exam 6: Arrays46 Questions
Exam 7: Inheritance43 Questions
Exam 8: Polymorphism and Abstract Classes43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 11: Recursion44 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class32 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections,maps,and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends26 Questions
Exam 20: Applets25 Questions
Select questions type
A constructor for a derived class begins with an invocation of a constructor for the base class.
(True/False)
5.0/5
(40)
Create a test driver to test the functionality of your AlarmClock class created in number 3 above.
(Essay)
4.9/5
(41)
Inheritance is the process by which a new class - known as a _________ - is created from another class,called the _____________.
(Multiple Choice)
4.8/5
(32)
Explain what a call to super)does in a constructor of a derived class.
(Essay)
4.8/5
(46)
If the final modifier is added to the definition of a method,this means:
(Multiple Choice)
4.7/5
(41)
An instance variable or method)that is private in a base class is accessible by name in the definition of a method in any other class.
(True/False)
4.8/5
(39)
Private methods of the base class are not available for use by derived classes.
(True/False)
4.8/5
(33)
Create a class to represent a Rectangle.Your class should contain instance variables for length and width,as well as member method to calculate the area and perimeter.
(Essay)
5.0/5
(48)
The special syntax for invoking a constructor of the base class is:
(Multiple Choice)
4.8/5
(46)
Overriding is when a derived class redefines a method from the base class.
(True/False)
4.8/5
(36)
In using the keyword this in place of super),the invocation of this must be the ___________ action taken by the constructor.
(Multiple Choice)
4.9/5
(35)
A derived class is a class defined by adding instance variables and methods to an existing class.
(True/False)
4.8/5
(33)
What does a derived class automatically inherit from the base class?
(Multiple Choice)
4.8/5
(36)
An object of a derived class has the type of the derived class,and it also has the type of the base class,and more generally,has the type of every one of its ___________ classes.
(Multiple Choice)
4.9/5
(39)
The equals method for a class should have _________ as the type of its one parameter.
(Multiple Choice)
5.0/5
(38)
The call to the base class constructor super)must always be the last action taken in a constructor definition.
(True/False)
4.8/5
(26)
Explain how parent and child classes are related to base and derived classes.
(Essay)
4.9/5
(36)
Showing 21 - 40 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)