Docsity

Use Case Realizations-Object-Oriented Design-Lecture 14 Slides-Computer Engineering, Slides of Object Oriented Analysis and Design

Partial preview of the text

Download Use Case Realizations-Object-Oriented Design-Lecture 14 Slides-Computer Engineering and more Slides Object Oriented Analysis and Design in PDF only on Docsity!

Department of Computer Engineering

Sharif University of Technology

Object-Oriented Design

Lecturer: Raman Ramsin

Lecture 14 :

Use Case Realizations – Part 2

Department of Computer Engineering

Sharif University of Technology

Analysis Workflow: Analyze a Use Case  The analysis workflow consists of the following activities:  Architectural analysis  Analyze a use caseOutputs:analysis classesuse case realizations  Analyze a class  Analyze a package

Department of Computer Engineering

Sharif University of Technology

Combined Fragments: Operators – opt and alt  opt - there is a single operand that executes if the condition is true (like if ... then).  alt - the operand whose condition is true is executed.

Department of Computer Engineering

Sharif University of Technology

Combined Fragments: Operators – opt and alt

Department of Computer Engineering

Sharif University of Technology

Combined Fragments: Operators – loop and break Syntax

Department of Computer Engineering

Sharif University of Technology

Combined Fragments: Operators – loop and break Example

Department of Computer Engineering

Sharif University of Technology

Communication Diagrams  Communication diagrams - emphasize the structural aspects of an interaction:  lifelines are connected by links;  messages have a sequence number - they are numbered hierarchically according to the nesting of the focus of control.

Department of Computer Engineering

Sharif University of Technology

Iteration  Iteration - use an iteration specifier (*) and an optional iteration clause on the message.  The iteration clause specifies the number of times to loop.  You can use natural language, pseudocode, source code, or sequence diagram loop notation for the iteration clause.  Iteration over a collection of objects:  Denoted by showing the role name and multiplicity (> 1 ) on the target end of the link and prefixing the message with *.  The message is sent to each object in turn.  Use the parallel iteration specifier *// to indicate that messages are executed in parallel.

Department of Computer Engineering

Sharif University of Technology

Branching  Branching - prefix messages with guard conditions. The message executes if the guard condition is true.  It can be hard to show branching clearly on a communication diagram - for complex branching, use sequence diagrams instead.

Department of Computer Engineering

Sharif University of Technology

Interaction Occurrences  Interaction occurrences: references to another interaction.  The flow of the referenced interaction is included in the flow of the referencing interaction.  Parameters - interaction occurrences may have parameters - use normal parameter notation.  Gates - inputs and outputs of interactions:  a point on the sequence diagram frame that connects a message outside the frame to a message with the same signature inside the frame.  Use parameters when you know the source and destination of all messages - use gates when you don't.

Department of Computer Engineering

Sharif University of Technology

Interaction Occurrences – Example SDs

Department of Computer Engineering

Sharif University of Technology

Interaction Occurrences – Parameters

Department of Computer Engineering

Sharif University of Technology

Reference  Arlow, J., Neustadt, I., UML 2 and the Unified Process: Practical Object-Oriented Analysis and Design, 2

nd

Ed. Addison-Wesley,