27
Software Software Engineering Engineering Chapter 7 Chapter 7 Fall 2000 Fall 2000

Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Embed Size (px)

Citation preview

Page 1: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Software Engineering Software Engineering

Chapter 7Chapter 7

Fall 2000Fall 2000

Page 2: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Capturing the Requirements Capturing the Requirements

as Use Casesas Use Cases

By using use cases analysts are forced to By using use cases analysts are forced to think in terms of who the users are and think in terms of who the users are and what business or mission needs can be what business or mission needs can be fulfilled through them.fulfilled through them.

Use cases play a key role in driving the Use cases play a key role in driving the rest of the development work.rest of the development work.

Page 3: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Use-Case Model – ArtifactUse-Case Model – Artifact

serves as an agreement between the serves as an agreement between the customer and the developerscustomer and the developers

consists of actors and use cases and their consists of actors and use cases and their relationshipsrelationships

If the use-case model is large, it can be If the use-case model is large, it can be organized into packages with different organized into packages with different levels of abstraction.levels of abstraction.

Page 4: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Actor – ArtifactActor – Artifact

parties or systems outside the system that parties or systems outside the system that collaborate with the systemcollaborate with the system

Each actor can have several rolesEach actor can have several roles An actor plays one role for each use case An actor plays one role for each use case

with which it collaborates.with which it collaborates.

Page 5: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Use Case – ArtifactUse Case – Artifact Each way the actors use the system is a Each way the actors use the system is a

use case.use case. A use case is a sequence of actions or a A use case is a sequence of actions or a

function.function. A use case specifies the behavior of A use case specifies the behavior of

dynamic things.dynamic things. A use case is a classifier (pre-class).A use case is a classifier (pre-class). A use case has operations and attributesA use case has operations and attributes

Page 6: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Use Case - ArtifactUse Case - Artifact

A use case description can include statechart A use case description can include statechart diagrams (fig 7.15&16), activity diagrams, diagrams (fig 7.15&16), activity diagrams, collaborations, and sequence diagramscollaborations, and sequence diagrams

A use case instance is an execution of the use case, A use case instance is an execution of the use case, or one path through the use case.or one path through the use case.

A use case generally does not handle concurrency A use case generally does not handle concurrency problems. Those may be identified in the analysis problems. Those may be identified in the analysis and solved in the design. and solved in the design.

The use cases are simply documenting what is The use cases are simply documenting what is required of the system from the user's point of required of the system from the user's point of view.view.

Page 7: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Examples of use case instances and Examples of use case instances and

the changing states:the changing states:  TransitionsTransitions StatesStates

Start the applicationStart the application Introduction screen displaysIntroduction screen displaysClick "Enter Data"Click "Enter Data" Input screen displaysInput screen displaysClick "Exit"Click "Exit" Application stoppedApplication stopped  TransitionsTransitions StatesStates Start the applicationStart the application Introduction screen displaysIntroduction screen displaysClick "Enter Data"Click "Enter Data" Input screen displaysInput screen displaysEnter the data, click "Submit" Schedule chart displaysEnter the data, click "Submit" Schedule chart displaysclick "Back"click "Back" Input screen displaysInput screen displaysclick "Forward"click "Forward" Schedule chart displaysSchedule chart displaysclick "Exit"click "Exit" Application stoppedApplication stopped  See "Modeling Large Systems" box on page 137-8.See "Modeling Large Systems" box on page 137-8.

Page 8: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  FFlow of eventslow of events

The flow of events for each use case can be The flow of events for each use case can be captured as a separate textual description captured as a separate textual description of the use case's sequence of actionsof the use case's sequence of actions

Page 9: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Special requirementsSpecial requirements

Textual description of requirements that Textual description of requirements that don't fit anywhere else, but belong to the don't fit anywhere else, but belong to the use case (such as nonfunctional use case (such as nonfunctional requirements).requirements).

Page 10: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Architecture Description – Architecture Description – ArtifactArtifact

The architecture description starts with The architecture description starts with the use cases, and includes an the use cases, and includes an architectural view of the use case model.architectural view of the use case model.Includes only the architecturally Includes only the architecturally significant use cases.significant use cases.

Page 11: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Glossary – ArtifactGlossary – Artifact

Any terms the users, developers or any Any terms the users, developers or any other stakeholders might not be familiar other stakeholders might not be familiar with should appear in the glossary with a with should appear in the glossary with a definition.definition.

These definitions also help to form a These definitions also help to form a concensus among developers where a concensus among developers where a term might have conflicting meanings.term might have conflicting meanings.

Page 12: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

User Interface Prototype – User Interface Prototype – ArtifactArtifact

Prototypes can be developed to show the Prototypes can be developed to show the users and other developers what the user users and other developers what the user interface will look like and how it will interface will look like and how it will work.work.

Screens, reports, etc. can also be drawn Screens, reports, etc. can also be drawn on paper to help with the description.on paper to help with the description.

Page 13: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

WWorkersorkers

a position to which a real person can be a position to which a real person can be assigned assigned

examples – President, tax accountant, examples – President, tax accountant, sales repsales rep

Page 14: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Worker – System AnalystWorker – System Analyst Responsible for the whole set of Responsible for the whole set of

requirements, actors, use cases, etc.requirements, actors, use cases, etc.Responsible for agreement with user or Responsible for agreement with user or customer.customer.

Responsible for terminology and Responsible for terminology and glossary.glossary.

Not necessarily responsible for doing Not necessarily responsible for doing each individual use case.each individual use case.

Page 15: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Worker – Use-case SpecifierWorker – Use-case Specifier

Responsible for detailed description of Responsible for detailed description of one or more use cases.one or more use cases.

Works with users of his/her use cases.Works with users of his/her use cases.

Page 16: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Worker – Interface DesignerWorker – Interface Designer

Responsible for describing what the user Responsible for describing what the user interface will look like for one or more interface will look like for one or more use cases.use cases.

Might do prototypes to show users and to Might do prototypes to show users and to help developers agree on the interface.help developers agree on the interface.

Page 17: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Worker – ArchitectWorker – Architect

Architect works in the requirements Architect works in the requirements workflow to describe the architectural workflow to describe the architectural view of the use-case model.view of the use-case model.

Page 18: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Figure 7.10Figure 7.10

System AnalystSystem Analyst– Find Actors and Use CasesFind Actors and Use Cases– Structure the Use-Case ModelStructure the Use-Case Model

ArchitectArchitect– Prioritize Use CasesPrioritize Use Cases

Use-Case SpecifierUse-Case Specifier– Detail a Use CaseDetail a Use Case

User-Interface DesignerUser-Interface Designer– Prototype User-InterfacePrototype User-Interface

Page 19: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Activity – Find Actors Activity – Find Actors and Use Casesand Use Cases

Page 20: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Finding the ActorsFinding the Actors

Make a list of possible actors including people Make a list of possible actors including people types and outside system typestypes and outside system types

For each possible actor, try to identify at least For each possible actor, try to identify at least one user or system who will play the roles of the one user or system who will play the roles of the actor.actor.

There should be a minimum of overlap in roles There should be a minimum of overlap in roles of 2 actors.of 2 actors.

The 2 actors could be combined into one, or a The 2 actors could be combined into one, or a third actor could be used with the overlapping third actor could be used with the overlapping roles.roles.

Examples of actors, page 147.Examples of actors, page 147.

Page 21: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

    

Finding the Use CasesFinding the Use Cases Sometimes they can be found from an Sometimes they can be found from an

existing business model.existing business model. Workshops with the users.Workshops with the users. Actions that actors perform.Actions that actors perform. Results that actors need (actions from Results that actors need (actions from

system to user).system to user). Other functions of the system.Other functions of the system.

Page 22: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Finding the Use Cases (cont.)Finding the Use Cases (cont.) Make list of candidate use casesMake list of candidate use cases Some on the list will not be use cases alone, but Some on the list will not be use cases alone, but

add to other use casesadd to other use cases For each use case, does it give a result of value For each use case, does it give a result of value

to a particular actor?to a particular actor? Through iterations the use cases will change Through iterations the use cases will change

and evolveand evolve Some may be modified through negotiations Some may be modified through negotiations

between users and developers to make the between users and developers to make the system more easily maintained or to add system more easily maintained or to add functionality for the user.functionality for the user.

Page 23: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Briefly Describing Each Briefly Describing Each Use CaseUse Case

For each use case, give it a short name For each use case, give it a short name and a longer description that will help in and a longer description that will help in fitting it into the big picture.fitting it into the big picture.

Page 24: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Describing the Use-Case Model Describing the Use-Case Model as a Wholeas a Whole

Diagrams and descriptionsDiagrams and descriptions Individual use casesIndividual use cases Interactions among use cases and actorsInteractions among use cases and actors

Can use packages to put use cases/actors Can use packages to put use cases/actors into groups.into groups.

Description of the overall model and how Description of the overall model and how it fits togetherit fits together

Informal review by persons not on the Informal review by persons not on the requirements/use case teamrequirements/use case team

Page 25: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Informal Review of Informal Review of Use Case ModelUse Case Model

All necessary functional requirements All necessary functional requirements have been captured as use cases.have been captured as use cases.

The sequence of actions is correct, The sequence of actions is correct, complete, and understandable for each complete, and understandable for each use case.use case.

Any use cases that provide little or no Any use cases that provide little or no value have been identified. If found, value have been identified. If found, these use cases should be reconsidered.these use cases should be reconsidered.

Page 26: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

Activity – Prioritize Use CasesActivity – Prioritize Use Cases

Which use cases need to be developed in Which use cases need to be developed in early iterations?early iterations?

Architectural View of the use case modelArchitectural View of the use case modelWhich are architecturally significant use Which are architecturally significant use cases?cases?

Prioritize all use cases, even those for Prioritize all use cases, even those for future iterations.future iterations.

Page 27: Software Engineering Chapter 7 Fall 2000. Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts

  Activity – Detail a Use CaseActivity – Detail a Use Case

describe the flow of events for each use describe the flow of events for each use case in detail.case in detail.

How does the use case start, end and How does the use case start, end and interact with users?interact with users?