Page 316 -
P. 316
chaPter 10 • object-oriented systems analysis and design Using Uml 283
application requirements Figure 10.22
submitted Potential met Accepted A statechart diagram that shows
Student Student
how a student progresses from
being a potential student to a
graduated student.
dorm
selected
Dorm Assigned
Student
program
selected
Current Program
Student student enrolled Student
in class
student successful
enrolled course
in class completion
Continuing Graduated
Student graduation Student
requirements
complete
student
graduated
Statechart diagrams are not created for all classes. They are created when:
1. A class has a complex life cycle.
2. An instance of a class may update its attributes in a number of ways through the life cycle.
3. A class has an operational life cycle.
4. Two classes depend on each other.
5. The object’s current behavior depends on what happened previously.
When you examine a statechart diagram, use the opportunity to look for errors and excep-
tions. Inspect the diagram to see whether events are happening at the wrong time. Also check that
all events and states have been represented. Statechart diagrams have only two problems to avoid.
Check to see that a state does not have all transitions going into the state or all transitions coming
out of the state.
Each state should have at least one transition in and out of it. Some statechart diagrams use
the same start and terminator symbols that an activity diagram uses: a filled-in circle to represent
the start and concentric circles with the center filled in to signify the end of the diagram.
Packages and Other UML Artifacts
Packages are containers for other UML things, such as use cases or classes. Packages can show
system partitioning, indicating which classes or use cases are grouped into a subsystem, called
logical packages. They may also be component packages, which contain physical system com-
ponents, or use case packages, containing a group of use cases. Packages use a folder symbol
with the package name either in the folder tab or centered in the folder. Packaging can occur
during systems analysis, or later when the system is being designed. Packages may also have
relationships, similar to class diagrams, which may include associations and inheritance.