SWEN-4321-CH03-1Chapter 3�Expanded Use Cases.pptx

ssuser73aaef 9 views 26 slides Oct 12, 2024
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Chapter 3�Expanded Use Cases


Slide Content

عملية نمذجة البرمجيات د محمد زكي شبير www.islamit.net

Chapter 3 Expanded Use Cases 10/29/2019 www.islamit.net د. محمد زكي شبير 2

KEY TOPICS IN THIS CHAPTER Main flow of an expanded use case Alternate flows: exception handlers and variants System sequence diagrams 10/29/2019 www.islamit.net د. محمد زكي شبير 3

Main flow of an expanded use case 10/29/2019 www.islamit.net د. محمد زكي شبير 4

Main flow The main flow is the most important section of an expanded use case. It is the description of the use case process when everything goes right, that is, when no alternate flow occurs. 10/29/2019 www.islamit.net د. محمد زكي شبير 5

bookstore example a first draft of the main flow of the Order books use case customer identifying herself searching and selecting books finally proceeding to payment 10/29/2019 www.islamit.net د. محمد زكي شبير 6

user identification What if the user has already identified herself on a use case that was executed just before the current one? This is a common situation. As at this point user identification is optional, it may be left as an alternate flow, as explained next section. 10/29/2019 www.islamit.net د. محمد زكي شبير 7

continue Therefore, the actions that better describe the main flow of use case Order books are the following: a user searches and selects books for buying and proceeds to payment 10/29/2019 www.islamit.net د. محمد زكي شبير 8

First draft for the main flow of the Order books use case. 10/29/2019 www.islamit.net د. محمد زكي شبير 9

First draft of the main flow of the Pay order use case. 10/29/2019 www.islamit.net د. محمد زكي شبير 10

Alternate flows A use case specifies a process that can be performed in real life in a number of different ways. Two people buying books would take different sequences of steps. If the sequences are sufficiently similar then the same flow must be used to describe both. But in some situations alternate flows must be used to indicate sequences that could occur in quite different ways. 10/29/2019 www.islamit.net د. محمد زكي شبير 11

Example 10/29/2019 www.islamit.net د. محمد زكي شبير 12

continue The problem with the use case flow in last Figure that makes it so unnecessarily complex is the quantity of “if-then” statements in its formulation . The main flow should indicate what would happen in an ideal situation. Exceptions and other variations to the main flow should be handled as alternate flows 10/29/2019 www.islamit.net د. محمد زكي شبير 13

Variants use cases for ordering books and paying for them could be considered a single use case with two scenarios . In that case, each scenario would be an alternate end for the use case: Save shopping cart or Proceed to checkout . These two possible endings may be represented as variants of the main flow of a single use case. 10/29/2019 www.islamit.net د. محمد زكي شبير 14

Main flow of a use case with variants . 10/29/2019 www.islamit.net د. محمد زكي شبير 15

10/29/2019 www.islamit.net د. محمد زكي شبير 16

10/29/2019 www.islamit.net د. محمد زكي شبير 17

Exception handling the analyst must concentrate on identifying the exceptions that could occur and create an alternate flow for each one An exception is not necessarily an event that seldom (rarely) occurs , but an event that if not handled prevents a process from proceeding. 10/29/2019 www.islamit.net د. محمد زكي شبير 18

Example of use case with exceptions identified . 10/29/2019 www.islamit.net د. محمد زكي شبير 19

continue 10/29/2019 www.islamit.net د. محمد زكي شبير 20

CRUD expanded CRUDs are use cases that follow a known pattern. This kind of use case consists of the optional execution of one out of four possible operations: create, retrieve, update, and delete . 10/29/2019 www.islamit.net د. محمد زكي شبير 21

Manage Customers <<crud>> 10/29/2019 www.islamit.net د. محمد زكي شبير 22

10/29/2019 www.islamit.net د. محمد زكي شبير 23

continue 10/29/2019 www.islamit.net د. محمد زكي شبير 24

System sequence diagrams 10/29/2019 www.islamit.net د. محمد زكي شبير 25

Elements of a sequence diagram 10/29/2019 www.islamit.net د. محمد زكي شبير 26
Tags