Auto is a superclass of LandVehicle, and LandVehicle is a superclass of Vehicle.
Auto is a superclass of LandVehicle, and LandVehicle is a subclass of Vehicle.
Auto is a subclass of LandVehicle, and LandVehicle is a superclass of Vehicle.
Auto is a subclass of LandVehicle, and LandVehicle is a subclass of Vehicle.
Question 3
Question
Which of the following statements are true?
Answer
"class A extends B" means B is a subclass of A.
"class A extends B" means A is a subclass of B.
A subclass is usually extended to contain more functions and more detailed information than its superclass.
A subclass is a subset of a superclass.
Question 4
Question
Match the following
Correct Response [blank_start]__3__[blank_end]
makes the software available for use
Correct Response [blank_start]__1__[blank_end]
ensures that the code meets the requirements specification and weeds out bugs.
Correct Response [blank_start]__4__[blank_end]
seeks to analyze the data flow and to identify the system’s input and output.
Correct Response [blank_start]__5__[blank_end]
involves translating the system design into programs.
Correct Response [blank_start]__2__[blank_end]
is concerned with updating and improving the product.
1.
Testing
2.
Maintenance
3.
Deployment
4.
Analysis
5.
Implementation
Answer
3
1
3
1
4
3
2
1
5
2
4
5
2
5
4
5
3
2
1
4
2
1
4
3
5
Question 5
Question
What is a class called that represents the most general entity in an inheritance hierarchy?
Answer
Default class.
Superclass.
Subclass.
Inheritance class.
Question 6
Question
Every dolphin has a fin. Every dolphin is an animal. What kind of relationship would best describe the first and second statements?
Answer
Dependency : Inheritance
Coupling : Dependency
Inheritance : Aggregation
Aggregation : Inheritance
Question 7
Question
You are creating a class inheritance hierarchy about motor vehicles that will contain classes named Vehicle, Auto, and Motorcycle. Which of the following statements is correct?
Answer
Vehicle should be the default class, while Auto and Motorcycle should be the subclasses.
Vehicle should be the superclass, while Auto and Motorcycle should be the subclasses.
Vehicle should be the subclass, while Auto and Motorcycle should be the superclasses.
Vehicle should be the subclass, while Auto and Motorcycle should be the default classes.
Question 8
Question
Which class represents a more specific entity in an inheritance hierarchy?
Answer
Default class
Superclass
Subclass.
Inheritance class.
Question 9
Question
It is common for certain classes to keep track of how many times certain events have occurred over the life of an object. This is done using
Answer
A private instance variable within the class.
A local variable within a mutator method.
A notification event to a helper class.
An array of objects.
Question 10
Question
When invoking a method with an object argument, ___________ is passed.
Answer
the contents of the object
a copy of the object
the reference of the object
the object is copied, then the reference of the copied object