Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(TCO 2) Given the following list of classes, attributes and methods, - identify

ID: 3672532 • Letter: #

Question

(TCO 2) Given the following list of classes, attributes and methods,

-      identify which items are classes, which items are attributes and which items are methods;

-      identify which class each attribute and method belongs to; and

-      suggest a class hierarchy given your list of classes.

*Note – no particular capitalization scheme is used in the list below to differentiate between classes, methods and attributes.

GainAltitude, DecreaseSpeed, Transportation, IdentificationNumber, MoveBackward, IncreaseSpeed, NumberOfDoors, Manufacturer, OpenHood, Airplane, MoveForward, MaximumAltitude, ComeInForLanding, MilesPerGallon, Car, NumberOfAisles (Points : 18)

Explanation / Answer

Classes : Transportation, Car, Manufacturer, Airplane

Attributes : IdentificationNumber, NumberOfDoors, MaximumAltitude, MilesPerGallon, NumberOfAisles

Method : GainAltitude, DecreaseSpeed, MoveBackward, IncreaseSpeed, OpenHood, MoveForward, ComeInForLanding