+ All Categories
Home > Documents > Requirements Modeling using UML 2.0 Use Cases

Requirements Modeling using UML 2.0 Use Cases

Date post: 26-Feb-2016
Category:
Upload: belva
View: 58 times
Download: 2 times
Share this document with a friend
Description:
Requirements Modeling using UML 2.0 Use Cases. Requirements Engineering. Software Lifecycle Activities. Software Design. Requirements Analysis. Implementation. System Engineering. Define software features. Testing. Deployment. Evolution. Example: Online HR System. - PowerPoint PPT Presentation
26
CSC 450 1 Requirements Modeling using UML 2.0 Use Cases
Transcript
Page 1: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

1

Requirements Modeling using UML 2.0 Use Cases

Page 2: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

2

Requirements Engineering

Software Lifecycle Activities

System Engineering

Requirements AnalysisSoftware Design

Implementation

Testing

Deployment

Evolution

Define software features

Page 3: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

3

Example: Online HR System

Online HR System

LocateEm ployees

UpdateEm ployee

Profile

Update Benefits

Access TravelSystem

Access PayRecords

Em ployee

M anager

Healthcare P lan System

{if currentM onth = O ct.}

{readO nly}

Insurance P lan System

Page 4: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

4

Online HR System: Update Benefits Use Case

Actors: employee, healthcare plan system, insurance plan system Precondition:

· Employee has logged on to the system and selected ‘update benefits’ option

Basic course· System displays employee account· System asks employee to select medical plan type; include Update

Medical Plan.· System asks employee to select dental plan type; include Update

Dental Plan.· …· System asks user to select benefits options: benefit options

· reimbursement option selected: Elect Reimbursement for Healthcare

· stock option selected: Elect Stock Purchase

Page 5: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

5

Simple Use Case exampleSystem Response

2. If customer is authenticated, then request rental items 4. Display calculated price.

6. Inform customer that payments is authorized

Actor Inputs1. Customer submits identification

information3. Customer submits items to be

rented5. Customer pays.

Item Rental Use Case

Page 6: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

6

Relating Use Cases Specializing/generalizing use cases Including use cases Extending use cases

Page 7: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

7

Construct Description Syntax

association The participation of an actor in a use case. i.e., instance of an actor and instances of a use case communicate with each other.

generalization A taxonomic relationship between a more general use case and a more specific use case.

extend A relationship from an extension use case to a base use case, specifying how the behavior for the extension use case augments (subject to conditions in the extension) the behavior defined for the base use case. The base use case does not depend on the extension use case. Compare: include.

include a relationship from a base use case to an inclusion use case, specifying how the behavior for the base use case contains the behavior defined for the inclusion use case. The base use case depends on the inclusion use case. Compare: extend.

Use Case Modeling: Core Relationships

<<extend>>

<<include>>

Page 8: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

8

Including Use Cases A use case can include another use

case at a specified location. Used to avoid writing the same flow

of events across a number of use cases.

The included use case must not be a stand-alone use case.

base inclusion

Page 9: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

9

Extension Points

A use cases may have extension points. An extension point is a point in the use case where its

behavior may be augmented with additional behavior. The additional behavior is specified by the extending

use case. The use case that is extended is called the base use

case. The extend relationship

The relationship between a base use case and an extending use case.

The extend relationship may be conditional

Page 10: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

10

Extending Use Cases

The base use case can act as a stand-alone use case.

The base use case can only be extended at extension points.

Often used to separate optional behavior from mandatory behavior.

Also used to model a separate flow that is executed under certain conditions.

base extension

On-Line Help

Page 11: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

11

Use Case DescriptionSystem Response

2. If customer is authenticated, then request rental items 4. Display calculated price.6. Inform customer that payments is authorized

Actor Inputs1. Customer submits identification

information3. Customer submits items to be rented5. Customer pays.

Item Rental Use Case

Any of the numbered activities could serve as an extension point.

Extension point syntax:<extension point>::=<name>[:<explanation>]

Page 12: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

12Fig. 3-54, UML Notation Guide

Use Case Relationships

additional requests :

OrderProduct

Supply Arrange

«include»«include»«include»

RequestCatalog

«extend»Extension points

PaymentCustomer Data

after creation of the order

Place Order

1 * the salesperson asks forthe catalog

Page 13: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

13

Example: Online HR System

Online HR System

LocateEm ployees

UpdateEm ployee

Profile

Update Benefits

Access TravelSystem

Access PayRecords

Em ployee

M anager

Healthcare P lan System

{if currentM onth = O ct.}

{readO nly}

Insurance P lan System

Page 14: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

14

Online HR System: Use Case Extension

Update Benefits______________Extension pointsbenefit options:

after required enrollmentsEmployee

ElectReimbursementfor Healthcare

Elect StockPurchase

<<extend>>employee requestsstock purchase option

<<extend>>employee requestsreimbursement option

extensioncondition

extension pointname andlocation

Page 15: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

15

Online HR System: Update Benefits Use Case with extension point

Actors: employee, healthcare plan system, insurance plan system Precondition:

· Employee has logged on to the system and selected ‘update benefits’ option

Basic course· System displays employee account· System asks employee to select medical plan type; include Update

Medical Plan.· System asks employee to select dental plan type; include Update

Dental Plan.· …· System asks user to select benefits options: benefit options

· reimbursement option selected: Elect Reimbursement for Healthcare

· stock option selected: Elect Stock Purchase

Page 16: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

16

Online HR System: Use Case relationships

Update M edicalPlan

Update DentalP lan

Update Benefits______________Extension pointsbenefit options:

after required enrollm ents

UpdateInsurance P lan

Em ployee

<<include>> <<include>> <<include>>

ElectReim bursem entfor Healthcare

Elect S tockPurchase

<<extend>>em ployee requestsstock purchase option

<<extend>>em ployee requestsreim bursem ent option

extensioncondition

extension pointname andlocation

Page 17: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

17

Online HR System: Update Benefits Use Case

Actors: employee, employee account db, healthcare plan system, insurance plan system

Precondition:· Employee has logged on to the system and selected ‘update benefits’

option Basic course

· System displays employee account information· System asks employee to select medical plan type; include Update

Medical Plan.· System asks employee to select dental plan type; include Update

Dental Plan.· …

Alternative courses· If health plan is not available in the employee’s area the employee is

informed and asked to select another plan...

Page 18: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

18

Specializing Use Cases Generalizing/specializing use cases

A specialized use case inherits the behavior (sequences of actions) of its parent(s).

A specialized use case can override some of the behavior of its parent(s). It can also add to the behavior.

A specialized use case can be used anywhere the general use case is expected.

Page 19: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

19

Example of Use Case Relationships

Open file by typing name

Open file by browsing

Open file

System Administrator

Browse for file

Ordinary User

Attempt to open file that does not exist

«extend» «include»

Page 20: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

20

Example description of a use case

Use case: Open file Related use cases: Generalization of: • Open file by typing name • Open file by browsing Steps:

Actor actions System responses 1. Choose ‘Open…’ command 2. File open dialog appears 3. Specify filename 4. Confirm selection 5. Dialog disappears

Page 21: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

21

Use case: Open file by typing name Related use cases: Specialization of: Open file Steps:

Actor actions System responses 1. Choose ‘Open…’ command 2. File open dialog appears 3a. Select text field 3b. Type file name 4. Click ‘Open’ 5. Dialog disappears

Example (continued)

Page 22: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

22

Use case: Open file by browsing Related use cases: Specialization of: Open file Includes: Browse for file Steps:

Actor actions System responses 1. Choose ‘Open…’ command 2. File open dialog appears 3. Browse for file 4. Confirm selection 5. Dialog disappears

Example (continued)

Page 23: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

23

Use case: Attempt to open file that does not exist Related use cases: Extension of: Open file by typing name

Actor actions System responses 1. Choose ‘Open…’ command 2. File open dialog appears 3a. Select text field 3b. Type file name 4. Click ‘Open’ 5. System indicates that file

does not exist 6. Correct the file name 7. Click ‘Open’ 8 Dialog disappears

Example (continued)

Page 24: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

24Organizing Use Cases I

Page 25: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

25

Organizing Use Cases II

Page 26: Requirements Modeling using UML 2.0 Use Cases

CSC450CSC450

26

Summary What’s coming next class?

______________________Devon M. Simmonds

Computer Science DepartmentUniversity of North Carolina Wilmington

_____________________________________________________________

Qu es ti ons?


Recommended