Kinesia Online Course
Object Oriented ProgrammingKinesia LLC, 2003
Modeling of Dynamic Behavaior and Sequence Diagrams
- UML Sequence Diagrams
- illustrate the dynamic behvaior of a system
- show the actors and objects which comprise the system and the messages
sent between them
- have actors and objects represented by rectangles, drawn left-to-right
across the top of the diagram
- show a timeline for the actor/object below each of the actor/objects
- use a narrow vertical rectangle to indicate the lifetime of the object;
- use a dotted line to indicate the part of the timeline when the object
does not exist
- draw arrows between the timeline rectangles,
to indicate messages (method calls and replies) sent between
objects
- Some Design Guidelines
- Get the Big Picture
- Understand the problem
- Think objects
- Encapsulation
- Maximize encapsulation
- Minimize coupling
- Separate the GUI
- Designing Classes
- A Class Needs a Purpose
- Classes vs. Attributes
- Composition vs. Inheritance
- Don't Make Classes Too Big
- Inheritance
- Use the Is-A Test
- Move Attributes and Operations as High as Possible (But Not Too High)
- Look for Superclasses
- General Guidelines
- Choose appropriate names
- Don't reinvent the wheel
- Refine the design
- Keep it simple
- Plan for the future