SPM Class Diagram
SPM Class Diagram
SPM Class Diagram
1 Sequence Diagram
4 Class Visibility
Represents how objects interact to perform the behaviour of a particular use-case, and
hence are best suited for use-case analysis.
Defines the roles of the objects that perform a particular flow of events of a use-case
Determines class responsibilities and interfaces
Collection of named objects and actors with links connecting them and they collaborate in
performing the task.
Objects establish a meaningful relationship between themselves, and provides emergent
desirable and high-level functionalities in object oriented systems.
Capture interactions that show the messages passing between objects and roles within the
collaboration, and each message has a sequence number.
Objects
Objects are named and have their specified classes
Class can have many objects : Object name : Class name
Each actor has a name and a role- Only one actor will be the initiator
Link is an instance of association
Messages are communication established between objects
+, - and symbols before an attribute and operation name in a class denote the visibility
of the attribute and operation.
+ denotes public attributes or operations
- denotes private attributes or operations
denotes protected attributes or operations
Parameter Directionality
Each parameter in an operation (method) may be denoted as in, out or inout which
specifies its direction with respect to the caller.
Direction is shown before the parameter name.
Perspectives of Class Diagram
Analysis models feature a mix of conceptual and specification perspectives.
Design model development evolves from specification to implementation
Specification: focus is on the interfaces of Abstract Data Type (ADTs) in the
software
Implementation: Describes how classes will implement their interfaces
The perspective affects the amount of detail to be supplied and the kinds of
relationships worth presenting.
Aggregation
Aggregation represents a ”part of” relationship.
Class2 is part of Class1.
Many instances (*) of Class2 can be associated with Class1.
Objects of Class1 and Class2 have separate lifetimes.
Composition
A special type of aggregation where parts are destroyed when the whole is destroyed.
Objects of Class2 live and die with Class1.
Class2 cannot stand by itself.
Dependency
An object of one class might use an object of another class in the code of a method.
If the object is not stored in any field, then this is modeled as a dependency
relationship.
Exists between two classes if changes to the definition of one may cause changes to
the other (but not the other way around). Class1 depends on Class2
Realization
Relationship between the blueprint class and the object containing its respective
implementation level details.
This object is said to realize the blueprint class - the relationship between the
interface and the implementing class.