Beruflich Dokumente
Kultur Dokumente
BITS Pilani
Hyderabad Campus
BITS Pilani
Hyderabad Campus
Todays Agenda
Use Cases The Benefits of Use Cases Strengths and Weaknesses Use case symbols & Use case diagrams Class diagrams
Use Cases
Support requirements engineering activities and the requirement process. Capture what a system is supposed to do, i.e., systems functional requirements. Describe sequences of actions a system performs that yield an observable result of value to a particular actor. Model actions of the system at its external interface. Capture how the system coordinates human actions.
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus
Use Case
A Use Case is an interaction between the system and a person or another system to achieve a result. A required bit of functionality. It yields an observable result of value to an actor (and hence a developer).
View Timetable
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus
Actors
A coherent set of roles that users of Use Cases play when interacting with Use Cases Roles not users or people User may have more than one role
Smith
Lecturer
Actors
Relationships
A semantic connection among elements Used to show:
A function required by an actor Relationships between actors
Person
View Timetable
System Boundary
A high level indication of the domain Limit to investigation
System Part of system in focus
Play Game
Solution
Move Left Move Right Fire Laser Player View High Scores
Play Game
Generalisation of actors
Types of users
Optional
<<include>>
Generalization of Actors
CMS
Case study
System has to run on an automated teller machine. User must be able to deposit checks into the account. User must be able to draw money from the account. User should be able to query the balance of his/her account. The user should get a receipt for a transaction on request. The transaction type (withdrawal or deposit), the transaction date, the account number, the amount, and the new balance should be visible on the receipt. After each transaction the new balance should be displayed to the user.
Common errors
connection between actors and use cases have no direction Connections between use cases are dotted ( ) and should be labeled <<extend>> or <<include>> <<extend>>: arrow points from use case describing the alternative event flow to the standard case <<include>>: arrow points from calling use case to use case that describes actions to include
Acceptable solution
<<extend>> (print receipt)
withdraw
check balance
User
deposit
Good solution
<<extend>> (print receipt)
<<include>> check balance <<include>> Verify user
withdraw
User
Class Diagrams
Class Diagrams are a standard visual representation to the following aspects: Classes and Interfaces
Fields
Methods Sub-type and sub-class relations (Inheritance) Abstract and concrete methods and classes
CS/IS F213 First Semester 2012-13 BITS Pilani, Hyderabad Campus
Class Diagrams
Classes are marked with a boxed text. A class box may have up to three compartments: 1 The class name 2 Fields 3 Methods
Visibility
A set of prefixes for attributes and methods
+ public visible to any class
# protected visible to any subclass
Constraint
Now, suppose ALL our 2D points must have an (x,y) coordinate such that both x and y are between 0 and 10 This is a constraint.
Static Members
Static members of a class (either attributes or methods) exist at the class level. They can be used without instantiated an object. In UML, these are underlined.
Inheritance
The relation B inherits from A is marked with a largeheaded triangular arrow, possibly to several sub-classes.
Summary
Use Cases in UML capture (to a certain extent) system requirements and support requirements engineering activities and processes Use Case notations and examples Describing use cases