Documenting Requirements using Use Case Diagrams.

25
Documenting Requirements using Use Case Diagrams
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    243
  • download

    0

Transcript of Documenting Requirements using Use Case Diagrams.

Page 1: Documenting Requirements using Use Case Diagrams.

Documenting Requirements using Use Case Diagrams

Page 2: Documenting Requirements using Use Case Diagrams.

UML

• Unified Modelling Language• Developed by Jacobson (1994)• Set of diagrams and techniques to model object

oriented analysis and design.– Use Case diagrams– Activity diagrams– Communication diagrams– Sequence diagrams– Class diagrams– State diagrams

Page 3: Documenting Requirements using Use Case Diagrams.

Use Case Modelling• Used to document the scope of the

system and the developer’s understanding of what the users require.

• good for modelling the functional requirements of a system.

• A separate list of systems requirements both functional and non-functional should also be maintained.

Page 4: Documenting Requirements using Use Case Diagrams.

• Each use case represents one system activity or task- a well-defined part of the system functionality as seen from a specific user(actor)’s point of view.

• They are backed up by behaviour specifications which specify the behaviour of each case using either UML diagrams or sequence diagrams, or in text form as use case descriptions.

• Examples• Calculate stock requirements• Create film programme• Create new member• Update member details• Print season report

Page 5: Documenting Requirements using Use Case Diagrams.

Requirements Gathering: Use Case Diagram shows SCOPE

Source: IBM Rational

Page 6: Documenting Requirements using Use Case Diagrams.

.

Page 7: Documenting Requirements using Use Case Diagrams.

.

Page 8: Documenting Requirements using Use Case Diagrams.

What is the aim of Use Case modelling?

• Elicit enough requirements information to prepare a model that communicates what is required from a user perspective.

• If user’s requirements change through the life cycle, then the change is initiated in the use case model.

• These changes then dictate what changes need to be made to other models.

Page 9: Documenting Requirements using Use Case Diagrams.

Use Case Diagrams

• Business requirements – essential use cases

Guest

Order food/drink

Bookspa

Request alarm call

Hotel self service subsystem

Check valid room number

<<includes>>

Page 10: Documenting Requirements using Use Case Diagrams.

Use Case Diagrams

Actor

Use case 2

Use case 1

Use case 3

subsystem

Includes relationship shows

Shared process

<<includes>>

Shows subsystem boundary

Use case

relationship

Page 11: Documenting Requirements using Use Case Diagrams.

Each Use Case

• Describes a system function from a user’s perspective• Details business events and users interaction with the

system during that event• Represents a system activity, a well-defined part of the

system’s functionality• Has a goal• Is initiated by an actor, but can interact with other actors.• Has a more detailed description, possibly specifying a

number of scenarios or alternate courses of action ( e.g. documented in a use case template)

Page 12: Documenting Requirements using Use Case Diagrams.

Types of Use Case

• Use cases are initially defined at a high level and successively refined and detailed as the analysis and software development process unfolds.

• Essential use case – key business requirements – brief scenario descriptions

• Real Use Case – more detail about what actually happens – use case template

What are the users trying to accomplish and why?

Page 13: Documenting Requirements using Use Case Diagrams.

Business Requirements use case

• Quickly document business events to define and validate requirements

• Focus on strategic vision and stakeholder goals

System use case

• Document use case narratives to more reflect implementation details and detailed system functionality

Page 14: Documenting Requirements using Use Case Diagrams.

Relationships

• Association – communication with use case.

OrderPhone

Customer

Page 15: Documenting Requirements using Use Case Diagrams.

Relationships: extends

• Extends – extract more complex steps into their own use case. An extension use case is used when it extends the functionality of a single use case.

• Used to model optional extras, additional functionality in a use case

• to model an extension to or variation of a use case.

Page 16: Documenting Requirements using Use Case Diagrams.

Example : Extends…

Used to specify optional extras, additional functionality

student

register

Student registration subsystem

Process late payment

<<extends>>

Extension pointsLate payment

If late payment authorised

Page 17: Documenting Requirements using Use Case Diagrams.

Relationships : Include

• Include – shows shared processes• Used if the intent is to factor common

behaviour into its own use case.

• – abstract use case – find 2 or more use cases that have identical functionality

Page 18: Documenting Requirements using Use Case Diagrams.

Example : Includes…

Search ebrarystudent

Search online databases

Examine accountLibrary subsystem

Login

<<includes>>

Page 19: Documenting Requirements using Use Case Diagrams.

Note.....

• Conditions can be shown as UML comments

• Arrows always point at the use case that is being included or extended.

Page 20: Documenting Requirements using Use Case Diagrams.

Relationships : dependency, inheritance

• Dependency – depends on – shows sequencing need.

• Inheritance.

Page 21: Documenting Requirements using Use Case Diagrams.

Actors

Stakeholders

• Who provide inputs to system

• Who receive outputs from system

• Who trigger events in the system

• Who maintain the information in the system

Actors are outside the system

Page 22: Documenting Requirements using Use Case Diagrams.

Relationships between Actors

Generalisation and specialisation

Example

• Campaign manager can do anything a staff contact can do and more – means that his role is a specialisation of a staff contact role.

• Inheritance

Page 23: Documenting Requirements using Use Case Diagrams.

Abstraction

Abstracting functionality into super use case - e.g.

• Assign staff team

• Assign staff member

becomes : Assign staff.

This helps define the functionality and helps cut excessive repetition.

Page 24: Documenting Requirements using Use Case Diagrams.

• Primary business actor benefits from action

• System actor – triggers system event

• External server actor responds to a request

• External receiver actor receives something.

Page 25: Documenting Requirements using Use Case Diagrams.

Identifying use cases…

• What are the main tasks of each actor?

• What information does the actor need from the system or provide to the system?

• Does the system/actor need to inform the system/actor of any changes?