Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final exam review Fall2007:Understanding UML

Help your fellow students here!

Back to Final Review-Fall 2007


A. REMOVEDst all of the methods in an instance of Attendant.
server(), safetyLecture()

B. How does a Pilot access all of the passengers on the flight?
getCrew().getPassengers()

C. REMOVEDst all of the classes that understand name.
all but flight

D. REMOVEDst all of the instance variables in an instance of Flight.
number, capacity, operatingAirline, flight, passengers

E. By what names does a flight know all of its crew members?
flight

F. How many crew members are there on every flight?
between 2 and 3

G.In class passenger, how would you access the flight number if...
flight number is public? flight.number
flight number is private? flight.getNumber()
flight number is protected? flight.getNumber()

H.If you are in class passenger, how would you access your name if...
name is public? name
name is private? getName()
name is protected? name

I have a question: If Crew Member had a method, called +sleep():

The answer for A then would be server(), safetyLecture() and sleep().

Is that right?

isn't B just getPassengers()? no getCrew() method exists...

For D, wouldn't it be "number, capacity, operatingAirline, crew, and passengers?"

in answer to above question, instead of crew it's flight- the variables should be switched, however, and in that case it would be crew instead of flight

in response to "isn't B just getPassengers()? no getCrew() method exists..."
i think u need to say getCrew() first for a pilot to get into the flight class; i believe it's implied that it is there. for all we know, it could be getMindlessIdiots()



Link to this Page