Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lab-02. 2 Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.

Similar presentations


Presentation on theme: "1 Lab-02. 2 Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides."— Presentation transcript:

1 1 Lab-02

2 2 Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides the framework to carry out the process of analysis and design in form of set of diagrams. 4 Every diagram and notation used in the diagram carries the semantics. 4 First step towards analysis and design is to specify the flow of events.

3 3 Flow of Events: 4 A flow of events document is created for each use case. 4 Details about what the system must provide to the actor when the use is executed. 4 Typical contents –How the use case starts and ends –Normal flow of events –Alternate flow of events –Exceptional flow of events 4 Typical Course of Events has: Actor Action(AA) System Response(SR)

4 4 Normal Flow of Events: For withdrawal of cash: 4 1.(SR) The ATM asks the user to insert a card. 4 2.(AA) The user inserts a cash card. 4 3.(SR) The ATM accepts the card and reads its serial number. 4 4.(SR) The ATM requests the password. 4 5.(AA) The user enters 1234. 4 6.(SR) The ATM verifies the serial number and password with the bank and gets the notification accordingly. 4 7.(SR)The ATM asks the user to select the kind of transaction. 4 8.(AA)User selects the withdrawal.

5 5 Normal Flow of Events: Contd... 4 9.(SR)The ATM asks for the amount of cash; user enters Rs. 2500/- 4 10.(SR)The ATM verifies that the amount of cash is within predefined policy limits and asks the bank, to process the transaction which eventually confirms success and returns the new account balance. 4 11.(SR) The ATM dispenses cash and asks the user to take it. 4 12.(AA) The user takes the cash. 4 13.(SR) The ATM asks whether the user wants to continue. 4 14.(AA) The user indicates no.

6 6 Normal Flow of Events: Contd... 4 15.(SR) The ATM prints a receipt, ejects the card and asks the user to take them 4 16.(AA) The user takes the receipt and the card. 4 17.(SR) The ATM asks a user to insert a card.

7 7 Alternative Flow of Events: For withdrawal of cash use case: 4 9. The ATM asks for the amount of cash; the user has change of mind and hits the “cancel”.

8 8 Exceptional Flow of Events: For withdrawal of cash use case: 4 10 The machine is out of cash. 4 11 Money gets stuck in the machine.

9 9 Why flow of events? 4 It helps in understanding the functionality of a system to be developed. 4 Flow of events helps in finding objects of the system to be developed.

10 10 USE CASE Realizations: 4 The use case diagram presents an outside view of the system 4 Interaction diagrams describe how use cases are realized as interactions among societies of objects. 4 Two types of interaction diagrams –Sequence diagrams –Collaboration diagrams

11 11 What is Interaction diagram? 4 Interaction diagrams are models that describe how groups of objects collaborate in some behavior 4 There are 2 kinds of interaction diagrams Sequence diagram Collaboration diagram 4 Sequence diagrams are a temporal representation of objects and their interactions 4 Collaboration diagrams are spatial representation of objects, links and interrelations

12 12 What is sequence diagram? 4 Typically these diagrams capture behaviors of the single scenario. 4 Shows object interaction arranged in time sequence. 4 They show sequence of messages among the objects. 4 It has two dimensions, vertical represents time & horizontal 4 represents objects. 4 Components of sequence diagram: -objects -object lifeline -Message -pre/post conditions.

13 13 OBJECT & OBJECT LIFE LINE: 4 Object are represented by rectangles and name of the objects are underlined. 4 Object life line are denoted as dashed lines. They are used to model the existence of objects over time. Name:Class

14 14 MESSAGES: 4 They are used to model the content of communication between objects. They are used to convey information between objects and enable objects to request services of other objects. 4 The message instance has a sender, receiver, and possibly other information according to the characteristics of the request. 4 Messages are denoted as labeled horizontal arrows between life lines. 4 The sender will send the message and receiver will receive the message.

15 15 MESSAGES: Contd… 4 May have square brackets containing a guard conditions. This is a Boolean condition that must be satisfied to enable the message to be sent. 4 May have an asterisk followed by square brackets containing an iteration specification. This specifies the number of times the message is sent. 4 May have return list consisting of a comma -separated list of names that designate the values of returned by the operation. 4 Must have a name or identifier string that represents the message. 4 May have parentheses containing an argument list consisting of a comma separated list of actual parameters passed to a method.

16 16 : Customer :ATM:Bank Request password Verify account Enter the password Account o.k. Request option Enter option Request amount Enter the amount Update transaction Transaction commit Insert card Dispense cash Request take cash Take cash Request continuation Terminate Print receipt,eject card Request take card Take card Display main screen and prompt for the card. : Transaction Create Transaction complete Sequence diagram [for withdrawal of cash, normal flow]


Download ppt "1 Lab-02. 2 Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides."

Similar presentations


Ads by Google