Functional Requirements Use Cases Chapters 14 21 Sriram

  • Slides: 28
Download presentation
Functional Requirements – Use Cases (Chapters 14 , 21) Sriram Mohan 1

Functional Requirements – Use Cases (Chapters 14 , 21) Sriram Mohan 1

What is a Functional Requirement? Functional requirements specify particular behaviors of a system. 2

What is a Functional Requirement? Functional requirements specify particular behaviors of a system. 2

What is a Use Case? A sequence of actions a system performs that yield

What is a Use Case? A sequence of actions a system performs that yield and observable result of value to a particular actor Sequences of actions Performed by system of interest Observable result of value to a particular actor 3

Benefits Easy to write and read Think from the perspective of an user Provides

Benefits Easy to write and read Think from the perspective of an user Provides a clear idea of the “what” and the “how” User involvement Use cases tell a better requirement story Typically developers are encouraged and required to write use cases. Why ? 4

Use Case Template A. B. C. D. E. F. G. H. I. J. Name

Use Case Template A. B. C. D. E. F. G. H. I. J. Name Brief description Actors Basic flow Alternate flows Pre-conditions Post-conditions Other stakeholders System/sub-system Special requirements 5

Use Case Model - Development Steps 1. 2. 3. 4. 5. Identify the actors

Use Case Model - Development Steps 1. 2. 3. 4. 5. Identify the actors Identify the use cases Identify actor/use case relationships Outline use cases Refine use cases 6

1. Identify the Actors Who uses the system? Who gets/provides information from/to system? Who

1. Identify the Actors Who uses the system? Who gets/provides information from/to system? Who supports the system? What other systems interact with this system? 7

2. Identify the Use Cases What are the intentions of each actor with respect

2. Identify the Use Cases What are the intentions of each actor with respect to the system? ◦ What are they going to use the system for? ◦ Does the actor provide some information? ◦ Does the actor need to be informed of something? 8

2. Identify the Use Cases Give a descriptive name: ◦ Start with an action

2. Identify the Use Cases Give a descriptive name: ◦ Start with an action verb ◦ Describes goal or intent Give a one-sentence description 9

3. Identify Actor/Use Case Relationships Draw a diagram showing relationships between actors and use

3. Identify Actor/Use Case Relationships Draw a diagram showing relationships between actors and use cases Eat food Parent Buy food Child 10

4. Outline Use Cases Describe sequence of events in basic flow (sunny day scenario)

4. Outline Use Cases Describe sequence of events in basic flow (sunny day scenario) Describe sequences of events in alternate flows (rainy day scenarios) 11

5. Refine Use Cases Describe sequences of events for flows Describe pre-conditions Describe post-conditions

5. Refine Use Cases Describe sequences of events for flows Describe pre-conditions Describe post-conditions Fill in special requirements 12

Pre and Post Conditions What is a pre-condition? What is a post-condition? 13

Pre and Post Conditions What is a pre-condition? What is a post-condition? 13

Use Case Template A. B. C. D. E. F. G. H. I. J. Name

Use Case Template A. B. C. D. E. F. G. H. I. J. Name Brief description Actors Basic flow Alternate flows Pre-conditions Post-conditions Other stakeholders System/sub-system Special requirements 14

Microwave Example Cook Food User 15

Microwave Example Cook Food User 15

Cook Food Use Case – Slide 1 of 4 A. B. C. Name: Cook

Cook Food Use Case – Slide 1 of 4 A. B. C. Name: Cook Food Brief description: User places food in microwave and cooks it for desired period of time at desired power level. Actors: User 16

Cook Food Use Case – Slide 2 of 4 D. Basic flow: 1. User

Cook Food Use Case – Slide 2 of 4 D. Basic flow: 1. User opens door and places food in unit 2. User enters time for cooking 3. User pushes start button 4. Unit cooks food 5. Unit beeps 17

Cook Food Use Case – Slide 3 of 4 E. Alternate flows 1. User

Cook Food Use Case – Slide 3 of 4 E. Alternate flows 1. User cancels time before starting 2. User cancels cooking before finished 3. User selects reduced power level before pushing start button 18

Cook Food Use Case – Slide 4 of 4 Pre-conditions ◦ Unit is plugged

Cook Food Use Case – Slide 4 of 4 Pre-conditions ◦ Unit is plugged in ◦ Unit is in ready state G. Post-conditions ◦ Food is cooked or user cancelled operation H. Special requirements ◦ Timer should display remaining time to finish while cooking ◦ Default power setting should be "high" F. 19

How do the use case and the storyboard fit? 20

How do the use case and the storyboard fit? 20

How do you know you have collected enough use cases? 21

How do you know you have collected enough use cases? 21

Extending Use Cases Extend an existing use case instead of redefining it 22

Extending Use Cases Extend an existing use case instead of redefining it 22

Microwave Extension Cook Food <<extend>> User Slice Food 23

Microwave Extension Cook Food <<extend>> User Slice Food 23

Including Use Cases Frequent sequences of events may be defined as use cases Including

Including Use Cases Frequent sequences of events may be defined as use cases Including a use case is like calling a subroutine 24

Microwave Inclusion Cook Food <<include>> User Set Timer 25

Microwave Inclusion Cook Food <<include>> User Set Timer 25

Cook Food Inclusion D. Basic flow: 1. User opens door and places food in

Cook Food Inclusion D. Basic flow: 1. User opens door and places food in unit 2. User performs Set Timer use case 3. User pushes start button 4. Unit cooks food 5. Unit beeps 26

Extra Credit Can all functional requirements be specified using use cases? Explain Turn in

Extra Credit Can all functional requirements be specified using use cases? Explain Turn in your Answer using Angel(Lessons – Extra Credit – Week 03 - Use Case Extra Credit) 27

Exam 1 Managing Software Requirements(Second Edition) ◦ Chapters 1 – 14 ◦ Chapter 21

Exam 1 Managing Software Requirements(Second Edition) ◦ Chapters 1 – 14 ◦ Chapter 21 Interaction Design – Beyond Human Computer Interaction ◦ Chapter 11 28