QUESTION 1 Which of the following represent good superclass-subclass pairs (gene
ID: 3877506 • Letter: Q
Question
QUESTION 1 Which of the following represent good superclass-subclass pairs (generalizations)? The superclass is on the left while the sub class is on the right. Hint: Look for violations of the isA rule, poor naming, and other problems. (Multiple Answers)a. Money – CanadianDollars
b. Bank – Account
c. SavingsAccount – CheckingAccount
d. Account – Account12876
e. Person – Customer
f. Student – GraduateStudent
g. Continent – Country QUESTION 2 Select all of the following that most likely indicate a class (all others indicate an instance of a class). Ignore case when selecting your answer. (Multiple answers)
a. GeneralMotors
b. AutomobileCompany
c. Boeing777
d. ComputerScienceStudent
e. MarySmith
f. Game
g. BoardGame
h. UniversityCourseSeg2100
i. Airplane
j. ThegameofchessbetweenTomAndJaneAt2:30pmYesterday
k. TheCarWithSerialNoJM198765T4 QUESTION 3 Which of the following classes would be declared in a Weather Forecasting System?
a. Forecast
b. WeatherMap
c. WeatherSymbol
d. WeatherSystem
e. All of the above are correct QUESTION 4 Which of the classes would be declared in a Video Rental System?
a. Customer
b. VideoEditing
c. VideoEnhancement
d. Audio
e. All of the above are correct QUESTION 5 Which of the following attributes would be found in a Classroom class declared within a University Scheduling System?
a. semester
b. startTime
c. endTime
d. roomNumber
e. All of the above 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:
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 intégrées 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
QUESTION 8 Questions 8, 9 and 10 uses the following heiarchy PostalCode PostalTest toString() gekCode) getDestination) setDestination validate) PostalCodeException moin gerCountry0 BritishPostalCode validate gelCountry) CanadianPostalCode validate) gelCountry0) USZipCode validate() gelCountry)
Explanation / Answer
Question 1:-
a. Money - CanadianDollars
e. Person - Customer
f. Student - GraduateStudent
These are the valid super-subclass pairs.
Quesion 2:-
a. GeneralMotors
b.AutomobileCompany
f. Game
These are the classes all the other are instances of the classes. Because these are the classes and the other options can be used as instance of these classes.
Question 3:-
a. Forecast
c.Weather Symbol
d.WeatherSystem
These are the only valid calsses because in the system we will have to say final weather foracast so we will create forecast class and the forecast can be represented using symbols also so we can create weathersymbol class also.
Question 4-
a. Customer
Among the given in the video rental system only customer class can be declare. All the other classes are not at all required in rental system.
Question 5:-
e. All the above
All the attributes are required to tell identify the classroom and its semester information.
I am allowed to answer these many questions only according to chegg policy. So please post the remaining as new question
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.