Lab # 5
Use Case and Activity Diagram
Objectives:
Study how to document use cases indetail.
Know about scenarios (flow of events) and itsimportance.
Deeper understanding of UML activitydiagrams.
Practicing flow of events and activity diagrams using RationalRose.
Topics:
Unified Modeling Language
Use Case Diagram
Activity Diagram
Tools Used:
MS Visual Paradigm
Submission Date:
14 MARCH 2018
Evaluation: Signatures of Lab Engineer
1. Background
Each use case is documented with a flow of events. The flow of events for a
use case is a description of the events needed to accomplish the required
behavior of the use case. Activity diagrams may also be created at this stage in
the life cycle. These diagrams represent the dynamics of the system. They are
flow charts that are used to show the workflow of a system; that is, they show
the flow of control from one activity to another in thesystem,
Flow ofEvents
A description of events required to accomplish the behavior of the use case, that:
Show WHAT the system should do, not HOW the system doesit.
Written in the language of the domain, not in terms ofimplementation.
Written from an actor point ofview.
A flow of events document is created for each use case:
Actors are examined to determine how they interact with thesystem.
Break down into the most atomic actionspossible.
Contents of Flow ofEvents
When and how the use case starts andends.
What interaction the use case has with theactors.
What data is needed by the usecase?
The normal sequence of events for the usecase.
The description of any alternate or exceptionalflows.
Template for the flow of eventsdocument
Each project should use a standard template for the creation of the flow of
events document. The following template seems to be useful.
X Flow of events for the <name> usecase
Preconditions
Main flow
Sub-flows (ifapplicable)
Alternativeflows
Where X is a number from 1 to the number of use cases.
2. CASETools
Visual Paradigm.
Minahil rasul 01-131162-009
Task # 5.1
Write flow of events and draw activity diagram of the given scenario
Procedure
Preconditions
Patient have all precious history of medical test and have appointment with
doctor.
MainFlow
This use case begins when a patient having medical record history and appointment with
diabetes doctor visits the hospital. The doctor checks the patient history and studies it. If
the patient medical history shows some symptoms related to disease, doctor write some
lab test for him such as BP test (E-1), Classify Diabetic type (E-2), Classify Patient
Work Type (E-3).
If the doctor prescribes BP test, then there is another sub flow is performed.
If the doctor prescribes Diabetic type test, then there is another sub flow.
If the doctor prescribes Checking work type then there is another sub flow.
If the patient is normal and show no other symptoms then the use case ends.
Sub-flows
E-1: BP test in Lab:
The system displays the patient record. Lab tester monitor his performance and
get the blood as a sample to perform some test on it. After performing the whole
Minahil rasul 01-131162-009
test, he create a medical report and hand over it to the patient.
E-2: Diabetic Type test:
From the medical history of patient. Lab tester identify what type of diabetes
the patient suffer from. It will then create a detail report for the doctor to
monitor it and prescribe some medicine according to it.
E-3: Classify Patient Work type:
By reviewing all reports, doctor identify the correct type of diabetes and give
further prescription that either the patient take some medicine , or there will be
another type of operation etc.
AlternativeFlows
If the patient shows no symptoms then the use case end.
If the patient shows some normal symptoms then the patient should take
some medicine.
If the patient shows critical symptoms then there should be some lab test for further
monitoring.
TASK # 5.2
Draw activity diagram of the given scenario
Minahil rasul 01-131162-009
A major distributor of office supplies has a set of criteria for preparing bills.
When the customer places the order one of the sales staff prepares the order and writes
the bill, if there is an insufficient quantity of items on hand, the back order is set up for
missing items. The available items are shipped and bill is prepared.
The cost is billed for the back order items when they shipped. Wholesale are eligible for
discount if they purchase minimum of 100 items. Retail customers are not eligible for
any discount irrespective of the number of items ordered. All retail customers pay sales
tax, Wholesale customers don’t pay any tax provided they have state tax exception. All
bills are mailed to customers.
Procedure
TASK # 5.3
Draw activity diagram of your project.
Procedure
The document is attached on the next page
Minahil rasul 01-131162-009
Minahil rasul 01-131162-009
Conclusion
In this lab we learned about activity Diagrams. In this lab we create activity
diagram of two different scenarios. In this lab we also create the activity diagram
of our own project
Minahil Rasul 01-131162-009