OOPortal OOPortal


Sequence Diagram   «Prev 

How do you define an Attribute in Object Oriented Analysis?

Define an attribute

  1. Derived attribute indicator: optional
  2. Attribute name: required
  3. Data type: required
  4. Assignment operator and default value: optional
  5. Constraints: optional
  6. Visibility: required before code generation
  7. Class attribute: optional

Object State and Behaviour

Real-world objects share two characteristics: They all have 1) state and 2) behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes)
  1. State: Every object, at any given point of time would have to have a set of attributes defining its State.
  2. Behavior: Every object based on its state and optionally identity will have particular behavior.