These are flashcards an notes made by students on topics like 'state', 'person' and 'short-lasting', originating from:

- Michael Jesse Chonoles
ISBN-10 0128096403 ISBN-13 9780128096406
1335 Flashcards & Notes
  • This + 400k other summaries, also in PDF!
  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo

Study Cards on state, person, short-lasting

Because states are relatively persistent, they are usually named using nouns or adjectival phrases that could be applied to the underlying class name.

Can you give an explanation of the state Person.
The state of a Person between the ages of 12 and 20 years would be best named either Teenager or Teenaged Person.

Often, the name of the underlying class is elided so you might see a state called Teenaged [Person]

Unless there is a standard domain terminology, states are usually named after the criteria for defining the state.

For example, isTeenager, isAdult, isSeniorCitizen.
Report
The names can also be based on the last operation handled by the object.

Give an example.

  • Person.isMarried

  • Book.isBorrowed

  • Car.isHailed

  • Worker.isRetired.     
Report
A state can also be named after a long-performing activity that is running, while in the state.

Give an example.
  • Idle
  • Cruising
  • Searching
  • Cruising
Report
For any ongoing operations, the state name is often a gerund  (a verb phrase ending in “ing”),

Give an example
  • Waiting
  • Cruising
  • Reading
  • Idling
Report
The names in a State Machine Diagram are identical to which diagrams?
These names may be identical to a corresponding activity from the Activity Diagrams.
Report
What is normally not a good choice for a state?
A very short-lasting behavior is not a good choice for a state unless the state can be detectable from outside and is meaningfully distinct from adjacent states.
Report
We often capture such short-lasting behavior as ..... in the State model,
We often capture such short-lasting behavior as ACTIONS in the State model, as they are often thought to be parallel to the actions in the Activity model.
Report
  • Higher grades + faster learning
  • Don't study anything twice
  • 100% sure, 100% understanding
Discover Study Smart