Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis Modeling Dynamic Modeling. Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams.

Similar presentations


Presentation on theme: "Analysis Modeling Dynamic Modeling. Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams."— Presentation transcript:

1 Analysis Modeling Dynamic Modeling

2 Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams (dynamic) – Class diagrams (static) – Flow oriented diagrams (dynamic) – Behavioral models: sequence diagrams (dynamic), state diagrams (dynamic) These models bridge the gap between requirements and implementation (code)

3 Activity/Swimlane diagrams Help us visualize the flows associated with use cases A swimlane diagram has multiple actors; an activity diagram is the same thing, but no concrete actors are distinguished

4 Other syntax Concurrency can be modeled by fork/join We can include one diagram inside of another – Enables reuse Fork/Branc h Join

5 Swimlane diagrams Start circle Ends in bulls-eye Decisions are diamonds (must always have a guard on all branches)

6 Sequence diagrams Used to model interactions between classes/objects Emphasis on time ordering Message passing between objects

7 Sequence Diagram Example messages are methods of the classes Synchronous message Asynchronous message Return message

8 Messages in sequence diagrams Messages, along horizontal lines, correspond to operations in your class diagram; i.e. they are method calls Three main types – Synchronous: expects return – Asynchronous: does not expect return – Return argument: dashed line Synchronous message Asynchronous message Return message

9 Sequence Diagram: option

10 Sequence diagram: Alternate/else

11 Sequence diagram: loop

12 State diagrams Once sequence diagrams have been constructed for each use case, a state diagram can be built for the system Can model the: – State of each class – State of the system as viewed from the outside

13 State diagram syntax 13 State Name (verb in current tense) (Optional) actions happening during state Name Examples: sorting validating updating status … [age > 20] [age <= 20] Guards: Use to describe event that causes a state transition happens (ALL transitions should have guards) [age <= 20]/setFlag(false) Action: If something happens while transitioning to another state. (Optional)

14 Quiz Review What does a swimlane diagram visually model? What does a sequence diagram model? What goes on the arrows in a sequence diagram? What are the three different types of arrows? What goes in a state for a state diagram? What can go on an arrow for a state diagram?

15 In-class exercises Let’s do a swimlane diagram for making a withdrawal at an ATM – the system should or should not be an actor? – see the use case we did earlier Let’s do a sequence diagram for making a withdrawal at an ATM What are some states for an ATM? – For the class CheckingAccount? – For the machine itself as viewed by a customer? – What are the triggers and transitions between theses states? Complete the exercise here: http://www.cs.gmu.edu/~kdobolyi/cs321/hwk04.html http://www.cs.gmu.edu/~kdobolyi/cs321/hwk04.html Due next class

16 Team Exercise Examine the Quiz Game description/use cases In your teams, come up with at least: – One swimlane diagram – One sequence diagram – One state diagram for a class – One state diagram for the system Turn in this assignment through svn


Download ppt "Analysis Modeling Dynamic Modeling. Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams."

Similar presentations


Ads by Google