Exam 10: Introduction to Inheritance
Exam 1: Creating Your First Java Classes76 Questions
Exam 2: Using Data81 Questions
Exam 3: Using Methods, Classes and Objects79 Questions
Exam 4: More Object Concepts84 Questions
Exam 5: Making Decisions80 Questions
Exam 6: Looping77 Questions
Exam 7: Characters, Strings and the Stringbuilder82 Questions
Exam 8: Arrays77 Questions
Exam 9: Advanced Array Concepts80 Questions
Exam 10: Introduction to Inheritance78 Questions
Exam 11: Advanced Inheritance Concepts78 Questions
Exam 12: Exception Handling79 Questions
Exam 13: File Input and Output78 Questions
Exam 14: Introduction to Swing Components79 Questions
Exam 15: Using Javafx and Scene Builder65 Questions
Select questions type
The ability to use inheritance in Java makes programs easier to write, ____, and more quickly understood.
(Multiple Choice)
4.8/5
(31)
Create a class named Student that contains methods getGPA() , setIDNum() , and setGPA() . Be sure to declare variables and methods appropriately as public or private.
(Essay)
4.8/5
(39)
When you create a class and do not provide a(n) ____, Java automatically supplies you with a default one.
(Multiple Choice)
4.8/5
(40)
What is the difference between derived classes and base classes when considering two classes that inherit from each other?
(Essay)
4.9/5
(34)
Using the keyword ____ provides you with an intermediate level of security between public and private access.
(Multiple Choice)
4.9/5
(35)
____ is a mechanism that enables one class to acquire all the behaviors and attributes of another class.
(Multiple Choice)
4.7/5
(39)
Usually, the subclass constructor only needs to initialize the ____ that are specific to the subclass.
(Multiple Choice)
4.8/5
(38)
Match each term with the correct statement below.
Premises:
"has a"
Responses:
superclass
aggregation
instanceof
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(39)
Match each term with the correct statement below.
Premises:
A part of UML
Responses:
fragile
class diagram
subtype polymorphism
Correct Answer:
Premises:
Responses:
(Matching)
5.0/5
(33)
What are the three types of methods that you cannot override in a subclass?
(Essay)
4.9/5
(45)
Which of the following statements depicts the valid format to call a superclass constructor from a subclass constructor?
(Multiple Choice)
4.8/5
(40)
It is useful to override the parent class members when the superclass data fields and methods are not completely appropriate for the subclass objects.
(True/False)
4.9/5
(40)
Match each term with the correct statement below.
Premises:
Determines whether an object is a member or descendant of a class
Responses:
upcast
inheritance
UML
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(37)
You have a Student class with a constructor that requires two arguments: a character "F" for Freshman and an integer "2020" for the year. Create a Freshman class that is a subclass of Student with a constructor for Freshman . Include the initial super() statement and include a comment that reads "//Other statements go here".
(Essay)
4.9/5
(38)
The class used as a basis for inheritance is the ____ class.
(Multiple Choice)
4.7/5
(37)
A nonstatic method cannot override a static member of a parent class.
(True/False)
4.9/5
(48)
Showing 61 - 78 of 78
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)