Presentation is loading. Please wait.

Presentation is loading. Please wait.

Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 

Similar presentations


Presentation on theme: "Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) "— Presentation transcript:

1 Use Case Modeling

2 Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis)  Detailed sequence diagram (design)  Updated object class diagram [with both attributes and programs (methods)] Then put together object class diagrams for all use cases and have one such diagram for entire system 2

3 What is Use Case Modeling? use case model: a view of a system that emphasizes the behavior as it appears to outside users. A use case model partitions system functionality into transactions (‘use cases’) that are meaningful to users (‘actors’). 3

4 Use Case Modeling: Core Elements 4

5 5 Use Case Modeling: Core Relationships > 5

6 Use Case Modeling: Core Relationships (cont’d) > 6

7 Use cases help… · Capture the system's functional requirements from the users' perspective · Actively involve users in the requirements-gathering process · Provide the basis for identifying major classes and their relationships · Serve as the foundation for developing system test cases 7

8 Use Case Diagrams  Actor  Line: actor communicates with or is associated with use-case Use Case Modeling (cont’d) 8

9 Use Case relationships:  >: one use case always involves the steps of another  >: under certain conditions, a use case follows a variant 9

10 Goals of Use Cases Interactions that provide value to actors No implementation specific language  No assumptions about how the use case may be realized in code or user-interface  Note: use-cases drive the whole life-cycle, and they get refined – implementation specific use-cases User-appropriate level of detail  General at requirements gathering stage User-appropriate volume  Large systems: no more than 70-80 use cases  Small number of use cases – forces abstraction 10

11 ACTOR: What is an actor? An actor is some one or something that must interact with the system under development UML notation for actor is stickman, shown below. Customer Manager Cashier 11

12 USE CASE: USE CASE documentation example: The following use case describes the process of opening a new account in the bank. Use case: Open new account Actors: Customer, Cashier, Manager Purpose: Like to have new saving account. Description: A customer arrives in the bank to open the new account. Customer requests for the new account form, fill the same and submits, along with the minimal deposit. At the end of complete successful process customer receives the passbook. Type: Primary use case. 12

13 OOAD --- USE CASE driven Capture,clarify & validate use cases AnalysisDesign & Implementation Implement use cases Use cases make up the glue Test Verify that use cases are satisfied 13

14 USE CASE Diagram: Use case diagram for the shown functionality. Balance status report Withdraw cash Validation uses Customer Clerk Manager extends ATM 14

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

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

17 Normal Flow of Events: Contd... 9.(SR)The ATM asks for the amount of cash; user enters $(s). 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. 11.(SR) The ATM dispenses cash and asks the user to take it. 12.(AA) The user takes the cash. 13.(SR) The ATM asks whether the user wants to continue. 14.(AA) The user indicates no. 17

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

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

20 Exceptional Flow of Events: For withdrawal of cash use case: 3. Suspicious pattern of usage on the card. 10. The machine is out of cash. 11. Money gets stuck in the machine. 20

21 : 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] 21

22 Collaboration Diagram [for withdrawal of cash, normal flow] 1. Insert card Enter password, Enter kind Enter amount, Take cash, Take card cancel,Terminate, Continue Display main screen unreadable card message, request password, request kind, request amount, canceled message, eject card, failure message, dispense cash, request take cash request continuation, print receipt, request take card bad account message, bad bank account message Verify account, process transaction Transaction succeed Transaction failed account o.k. bad account, bad password, bad bank code Create Transaction Transaction complete CUSTOMER BANK ATM TRANSACTION 22

23 Class Diagram [for withdrawal of cash, normal flow] Customer Transaction 1 0..* 1 ATMSystem 1..* Bank[Branch] 1 1..* 1 1 1 1 1 23

24 Component Diagram [for withdrawal of cash] policy.dll Branch Bank.dllcustomer.dll ATM.exe Branch Bank.exe Bank Server.exe 24


Download ppt "Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) "

Similar presentations


Ads by Google