which actor has responsibility for activity rectangle actions
responsibilities are represented by parallel line segments that divide
the diagram vertically headed by the responsible actor
Analysis Classes
grammatical parse - examine the problem statement and try to
find nouns that fit the following categories and produce or consume
information
external entities (systems, devices, people)
things (e.g., reports, displays, letters, signals)
events occurring during system operation
roles (e.g., manager, engineer, salesperson)
organizational units (e.g., division, group, team)
places (e.g., laboratory, control room, aircraft cockpit)
structures (e.g., sensors, vehicles, computers)
consider whether each potential class satisfies one of these criteria
as well
contains information that should be retained
provides needed services
contains multiple attributes
has common set of attributes that apply to all class instances
has common set of operations that apply to all object instances
represents external entity that produces or consumes information
specifying class attributes
examine the processing narrative or use-case and select the things
that reasonably can belong to each class
ask what data items (either composite or elementary) fully define
this class in the context of the problem at hand?
defining operations
grammatical parse - look at the verbs in the processing narrative
and identify operations reasonably belonging to each class, that...
manipulate data
perform computation
inquire about the state of an object
monitor object for occurrence of controlling event
divide operations into sub-operations as needed
also consider communications that need to occur between objects
and define operations as needed
Class-Responsibility-Collaborator (CRC) Modeling
develop a set of index cards that represent the system classes
one class per card
cards are divide into three sections (class name, class responsibilities,
class collaborators)
once a complete CRC card set is developed it is reviewed examining
the usage scenarios
allocating responsibilities to classes
distribute system intelligence evenly
state each responsibility as generally as possible
information and its related behaviors should reside within the
same class
localize all information about one thing in a single class
share responsibilities among related classes when appropriate
collaborators
any time a class cannot fulfill a responsibility on its own
it needs to interact with another class
composite aggregate class
composite class is the sum of its parts
collaboration relationships
association
present any time two classes are related to one another
in some fashion
multiplicity or cardinality can be indicated in a UML
class diagram
dependency -
client/server relationship between two classes
dependency relationships are indicated in class diagrams
using stereotype names surrounded by angle brackets (e.g.,
«stereotype»)
reviewing CRC models
Each review participant is given a subset of the CRC cards (collaborating
cards must be separated)
All use-case scenarios and use-case diagrams should be organized
into categories
Review leader chooses a use-case scenario and begins reading
it out loud
Each time a named object is read a token is passed to the
reviewer holding the object's card
When the reviewer receives the token, he or she is asked
to describe the responsibilities listed on the card
The group determines whether one of the responsibilities
on the card satisfy the use-case requirement or not
If the responsibilities and collaborations on the index
card cannot accommodate the use-case requirements then modifications
need to be made to the card set
create Class Diagrams
Analysis Packages
categorization is an important part of analysis modeling
analysis packages are made up of classes having the same categorization
in class diagrams visibility of class elements can be indicated
using a + (public), - (private), # (package)
Object-Behavior Model Construction
UML State Diagrams
state transition diagrams represent the system states and events
that trigger state transitions
STD's indicate actions (e.g., process activation) taken as a consequence
of a particular event
a state is any observable mode of behavior
round corned rectangles are used for each state
arrows connecting states are labeled with the name of the event
that triggers the transition from one state to the other
guards limiting the transition from one state to the next may be
specified as Boolean conditions involving object attributes in the
use-case narratives
UML Sequence Diagrams
built from use-case descriptions by determining how events cause
transitions from one object to another
key classes and actors are shown across the top
object and actor activations are shown as vertical rectangles arranged
along vertical dashed lines called lifelines
arrows connecting activations are labeled with the name of the event
that triggers the transition from one class or actor to another
object flow among objects and actors may be represented by labeling
a dashed horizontal line with the name of the object being passed