KARABUK UNIVERSITY
Computer Engineering Department
CPE 310 Software Engineering
Lab#6
Requirements Modeling
Scenario-based methods: User Case Diagrams
Hasan Kivrak
Agenda
● We will learn about
○ Use Case Diagram
■ Systems
■ Actors
■ Use Cases
■ Relationships
○ Go over an example
Requirements Analysis
● The objective is to create a
variety of representations that
describe what the customer
requires.
● Types of UML Diagrams
● Analysis modeling leads to the
derivation of one or more of
these modeling elements.
○ may differ from project to project
○ Only those modeling elements
that add value to the model
should be used.
Problems of Requirements Elicitation
● Stakeholders don’t know what they really want.
● Stakeholders express requirements in their own terms.
● Different stakeholders may have conflicting requirements.
● Organisational and political factors may influence the system
requirements.
● The requirements change during the analysis process. New
stakeholders may emerge and the business environment may
change.
Scenario-based Modelling: Use case diagrams
● depict software requirements from the user’s point of view
● Used to visualize, specify, construct, and document the (intended)
behavior of the system, during requirements capture and analysis.
● Provide a way for developers, domain experts and end-users to
Communicate.
● Serve as basis for testing.
Example : Use Case (Banking App.) - I
● The use case starts when the customer
provide information into the system.
○ The system requests the user PIN.
■ The system validates the PIN.
● If the validation succeeded,
the customer can choose the
banking based operations
● else validation failure is
executed.
Example : Use Case (Banking App.) - II
● The customer transfer funds or make a
payment.
● The system verify sufficient funds/the amount
of cash in the user account
○ If the amount of cash is valid
■ perform the action either from
checking or savings account
○ else amount exceeded is executed.
Check Balance Transfer Funds Make Payment
Example : Use Case (Banking App.) - III
● Customer can set up their profile
○ If a customer is confused then can go to
■ Profile Help
■ Privacy Info, if they want details
regarding their private information
Example : Use Case (Banking App.) - IV
Example : Use Case (Money Withdraw) - II
● Actors: Customer, Bank
● Pre Condition:
○ The App must be in a state ready to accept transactions
○ The App must have at least some cash on hand that it can dispense
○ The ATM must have enough paper to print a receipt for at least one transaction
● Post Condition:
○ The current amount of cash in the user account is the amount before the withdraw minus
the withdraw amount
○ A receipt was printed on the withdraw amount
○ The withdraw transaction was audit in the System log file
Example : Use Case (Money Withdraw) - II
Typical Course of events:
Example : Use Case (Money Withdraw) - III
● Alternative flow of events:
○ Step 3: Customer authorization failed. Display an error message, cancel the
transaction and eject the card.
○ Step 8: Customer has insufficient funds in its account. Display an error message,
and go to step 6.
○ Step 8: Customer exceeds its legal amount. Display an error message, and go to
step 6.
● Exceptional flow of events:
○ Power failure in the process of the transaction before step 9, cancel the transaction
and eject the card