100 likes | 134 Views
Use Case realization. How classes collaborate to realize use cases or system functionality. Analysis class diagrams. Tells a story about the system Generic and valid for all implementations Involves classes and associations Describes the nature of interaction between classes
E N D
Use Case realization How classes collaborate to realize use cases or system functionality
Analysis class diagrams • Tells a story about the system • Generic and valid for all implementations • Involves classes and associations • Describes the nature of interaction between classes • Described using roles played by classifier
Interaction diagrams • Describes object (instance) interaction • Specifically describes how the objects collaborate and interact • Collaboration diagram – describes structured relationships between objects • Sequence diagram – describes time-ordered sequence of messages between objects
Collaboration is a static set of relationships between instances • Interaction is a dynamic interaction – including specific messages • Collaboration: Object A has a role with B • Interaction: A plays with B, A studies with B, A …. with B • Descriptor form – describes roles played by instances • Shows - Context in which interaction may occur • Instance form of collaboration diagram is between objects and has links
Class Diagram • Manager class has an association (named boss) to Supervisor • Object Diagram: Collaboration • Peter:Manager has links to Jack:Supervisor • Assigntask, employ, and assist can be part of the boss role • Object Interaction Diagram – for use-cases • Peter object first requests addschedule(..) to ManageSchedule which then does updateschedule(..) to Jack object
Messages can be sent to multi-object. • Messages sent to oneself are self-delegating requests • One can depict branching and iterations as well • Object creation and disposal are also shown when appropriate • Concurrent objects are shown in bold boxes • Object states can be clarified with curved edge boxes.
Sequence Diagram • Similar to Object Interaction Diagram • Shows a sequence of interactions involved in a use-case • Objects are laid left to right and events are depicted top to bottom as they occur.
Activity Diagram • Similar to flow chart – except uses OO elements • It is a diagrammatic representation of the algorithm – and hence corresponds to the source code. • Activity can be deemed atomic (can’t be broken down), uninterruptible, or instantaneous • You have a start state and stop state
Decisions during activity • Concurrent activity • Flow of outputs from one activity to another can also be shown • Sending and reception of signals (asynchronous communication of information) can also be represented
Which one to use? • Collaboration diagram emphasize collaboration between objects. And roles played by instances • Sequence diagram emphasize the interaction as time ordered sequence of messages between instances • These two are isomorphic • Activity diagrams are OO flow charts – models a process