Question
QUESTION 6 Which of the following would be an appropriate Superclass for the following subclasses? Truck Ambulance Bus a. Car b. Driver c. Vehicle d.
QUESTION 6
Which of the following would be an appropriate Superclass for the following subclasses?
Truck Ambulance Bus
a.
Car
b.
Driver
c.
Vehicle
d.
Train
QUESTION 7
Chapter 7 uses the following hierarchy:
Images intgres 2
Leaf classes are concrete while all non-leaf classes are abstract. Which of the following object-method pairs would require dynamic binding? (Multiple Answers)
a.
Object Type Method Name
Rectangle getPerimeterLength
b.
Object Type Method Name
SimplePolygon getCenter
c.
Object Type Method Name
Polygon getBoundingRect
d.
Object Type Method Name
EllipticalShape changeScale
e.
Object Type Method Name
RegularPolygon translate
QUESTION 8
Questions 8, 9 and 10 uses the following heiarchy:
Images intgres 1
Which of the following methods in PostalCode would most appropriately be implemented as abstract?
a.
getCode
b.
getDestination
c.
validate
d.
setDestination
QUESTION 9
Which of the following classes would most likely be implemented as abstract?
a.
PostalCodeException
b.
PostalTest
c.
CanadianPostalCode
d.
PostalCode
QUESTION 10
Which of the following classes most like be implemented as final?
a.
PostalCode
b.
USZipCode
c.
Either a or b could be implemented as final
d.
Neither a or b could ever be implemented as final
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started