Professional Documents
Culture Documents
2
C Requirements
Data flow diagram explains the flow of data items across various functions.
Useful for explaining system functions.
State transition diagram explains the change of system state in response to one
or more operations. 3
D Requirements
Inspect
4
The Requirements Model
5
6
What Is System Behavior?
7
What Is a Use-Case Model?
A model that describes a system’s functional requirements in
terms of use cases
Represents
8
Purposes of Use Case Diagrams
Used to gather the requirements of a system.
Used to get an outside view of a system.
When we are planning to draw a use case diagram, we should have the
following items identified.
Functionalities to be represented as use case
Actors
Use case diagrams are drawn to capture the functional requirements of a system.
9
What Is an Actor?
11
What is an Use case.
A use case is
12
How to Find Use Cases
Does the actor need to be informed about certain occurrences in the system?
Will the actor need to inform the system about sudden, external changes?
13
Elements of Use Case Diagram
14
Linking Use Cases
Association relationships
Generalization relationships
Include relationships
One use case (base) includes the
Extend relationships
One use case (extension) extends the behavior of another (base)
15
1. Generalization
The child use case inherits the behavior and meaning of the parent
use case.
16
Generalization examples…
17
Generalization examples…
18
2. Include
The base use case explicitly incorporates the behavior of another use case at a
location specified in the base.
The included use case never stands alone. It only occurs as a part of some larger
base that includes it.
Enables us to avoid describing the same flow of events several times by putting the
common behavior in a use case of its own.
19
Include relationship
Include relationship – a standard case linked to a mandatory use
case.
Standard use case can NOT execute without the include case ->
tight coupling .
20
Include relationship
21
3. Extend
The base use case implicitly incorporates the behavior of another use case at
certain points called extension points.
The base use case may stand alone, but under certain conditions its behavior may
be extended by the behavior of another use case.
Extend relationship
linking an optional use case to a standard use case.
Example: Register Course (standard use case) may have Register for Special Class
(extend use case) – class for non-standard students, in unusual time, with special topics,
requiring extra fees…).
23
Extend Example #2
24
Extend Example #2 contd.
25
Brief Overview of Use Case Core Components
and Structure
26
Brief Overview of Use Case Core Components and Structure
27
Use-Case Specifications
Name
Brief description
Flows of Events
Relationships
Activity diagrams
Use-Case diagrams
Special requirements
Pre-conditions
Post-conditions
Other diagrams
• Brief Overview of 28
Use Case Core Components and Structure:
Use Case Description
Basic Structure and Components Post-Conditions
Additional Components
Use Case: Name Basic Flow
Special Requirements
Brief Description Alternate Flows
Data Sources *
Actors Exception Flows
Dependencies
Pre-Conditions Assumptions
Open Issues
29
Scenarios
Scenario: a set of actions performed to achieve a goal under some
conditions
Actions specified as a sequence of steps
30
Example 1
Goals of Stakeholders:
Purchaser: wants to buy stocks
Company: wants full transaction info Precondition: User already has an account
32
Example 2
34
UML Class Diagram
Class diagram is a static diagram. It represents the static view of an
application.
Class diagram describes the attributes and operations of a class and also
the constraints imposed on the system.
The class diagrams are widely used in the modeling of object oriented
systems because they are the only UML diagrams, which can be mapped
directly with object-oriented languages.
35
UML Class Diagram components
The main symbols shown in class diagrams are:
Class: A class represents the blueprint (template) of its objects.
Associations
An association represents a relationship between two classes.
Generalizations
A generalization groups classes into an inheritance hierarchy. 36
Contd..
The following points should be remembered while drawing a class
diagram :-
The name of the class diagram should be meaningful to describe the aspect of the system.
Use notes whenever required to describe some aspect of the diagram. At the end of the
Finally, before making the final version, the diagram should be drawn on plain paper and
The two inherited classes have all the properties as the Order class.
39
UML Representation of Classes
A class is simply represented as a box with the name of the class
inside.
The diagram may also show the attributes and/or operations (fields
and behaviour).
The complete signature of an operation is:
operationName(parameterName: parameterType …): returnType
Examples:
Rectangle Rectangle Rectangle Rectangle Rectangle
getAre height height height: int
a width width width: int
reSize getArea getArea(): int
reSize
reSize(int,int
) 40
Association and Multiplicity
An association shows how classes are connected to each other:
Symbols indicating multiplicity are shown at each end of
the association. *
Employee Company
* 1..*
Secretary Manager
Company BoardofDirectors
0..1 *
Office Employee
0, 3..8 *
Person BoardofDirectors
LEGEND
x..* (the range from x to many).
x..y (the range from x to y).
41
Labelling Associations
Association Association
Role Association Name Role
Class1 Class2
42
Labelling Associations
* Works for →
Employee Company
Company BoardofDirectors
0..1 isAllocated *
Office Employee
0, 3..8 isMember *
Person BoardofDirectors
43
Contd..
* Works for →
Employee Company
Many-to-one
A company has many employees.
An employee can only work for one company.
This system is not capable of processing information about
more than one company per employee.
44
Contd..
* 1..*
Secretary Manager
Many-to-many
A secretary can work for many managers.
A manager can have many secretaries.
Secretaries can work in pools.
Managers can have a group of secretaries.
Some managers might have zero secretaries.
It is not possible for a secretary to have zero managers.
45
Contd..
Company BoardofDirectors
One-to-one
0, 3..8 isBoardMember *
Person BoardofDirectors
Many-to-many