Exam 10: Introduction to Inheritance
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
If jrStudent is an object of Student , which of the following statements will result in a value of true ?
Free
(Multiple Choice)
4.8/5
(31)
Correct Answer:
B
The methods in a subclass can use all of the data fields and methods that belong to its parent, with one exception: ____ members of the parent class are not accessible within a child class's methods.
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
A
When you create a class by making it inherit from another class, the new class automatically contains the data fields and _____ of the original class.
Free
(Multiple Choice)
4.7/5
(30)
Correct Answer:
B
You can use the keyword _______ within a method in a derived class to access an overridden method in a base class.
(Multiple Choice)
4.8/5
(39)
By convention, a class diagram contains the ____ following each attribute or method.
(Multiple Choice)
4.7/5
(46)
When you employ ____, your data can be altered only by the methods you choose and only in ways that you can control.
(Multiple Choice)
4.8/5
(37)
public class ASuperClass
{
public ASuperClass()
{
System.out.println("In superclass constructor");
}
}
public class ASubClass extends ASuperClass
{
public ASubClass()
{
System.out.println("In subclass constructor");
}
}
public class DemoConstructors
{
public static void main(String[] args)
{
ASubClass child = new ASubClass();
}
}
Given the above code, what will the output be when DemoConstructors executes?
(Essay)
4.8/5
(35)
What happens when you write your own constructor in Java and what must you pay attention to?
(Essay)
4.9/5
(39)
public HourlyEmployee(char dept, double rate, int hours)
{
---- code here ----
}
Given the overloaded constructor above, write the appropriate statement that calls the superclass constructor and passes the indicated arguments to the superclass constructor.
(Short Answer)
4.8/5
(39)
What are the three types of methods that you cannot override in a subclass?
(Essay)
4.8/5
(38)
If a programming language does not support ____, the language is not considered object-oriented.
(Multiple Choice)
4.8/5
(41)
Use the above code and sections labeled 1, 2, and 3 to answer the following:
Identify the labeled section that is the constructor for the Bicycle class, identify the section of fields of the Bicycle class, and identify the Bicycle class methods.

(Essay)
4.8/5
(41)
When you create any subclass object, the subclass constructor must execute first, and then the superclass constructor executes.
(True/False)
4.9/5
(33)
In most Java classes, the keyword private precedes each data field, and the keyword ____________________ precedes each method.
(Short Answer)
4.9/5
(34)
The classes you create in ____________________ programming languages can inherit data and methods from existing classes.
(Short Answer)
5.0/5
(31)
Match each term with the correct statement below.
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(38)
How are real-life examples of inheritance similar to object-oriented programming inheritance?
(Essay)
4.9/5
(39)
Showing 1 - 20 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)