Lab Manual 04 - 03-11-2022
Lab Manual 04 - 03-11-2022
Lab Manual 04 - 03-11-2022
Lab 04
OBJECTIVE: Working with the UML Activity Diagrams and State Transition Diagrams
Student Information
Student Name
Student ID
Date
Assessment
Marks Obtained
Remarks
Signature
Modeling with Activity Diagram
1. Activity node
Activities can be broken down further
2. Initial node
Start of the execution of an activity
5. Decision node
Splitting of one execution path into two or more alternative execution paths
6. Merge node
Merging of two or more alternative execution paths into one execution path
7. Parallelization node
Splitting of one execution path into two or more concurrent execution paths
8. Synchronization node
Merging of two or more concurrent execution paths into one execution path
9. Edge
Connection between the nodes of an activity
10. Partition
Grouping of nodes and edges within an activity
The two actors would be a customer and a ticket counter having following activities.
Search train
Check availability of train (if yes go to book ticket, if no go to quit)
Quit
Book ticket
Fill details
Submit details
Make payment
Print Ticket
Cancel ticket
Get refund
2. Draw activity diagram of patient management system having two actors Receptionist and
Doctor. (e.g. Appointment Management System)
State Transition Diagrams
1. State
Description of a specific “time span” in which an object finds itself during its “life
cycle”. Within a state, activities can be executed on the object.
2. Transition
State transition e from a source state S to a target state T
3. Initial state
Start of a state machine diagram
4. Final state
End of a state machine diagram
5. Terminate node
Termination of an object’s state machine diagram
6. Decision node
Node from which multiple alternative transitions can proceed
7. Parallelization node
Splitting of a transition into multiple parallel transitions
8. Synchronization node
Merging of multiple parallel transitions into one transition
Students Task
1. Consider the bank account system where a bank account in either is Active or Dormant
(inactive). If it is active, it could be either with zero balance or with some funds.
Create State Machine Diagram of the above banking system, mention all events and
possible guards. Also include appropriate Entry, Do and Exit activities.
The manager first login and the system check the required credential provide by the
manager.
It authenticates and if it is successful, it moves to the next state where the manager
can add employee.
If the authenticate fails, it moves to a state where it again ask to reenter the credentials.
The manager can add employee and move to record deletion state or the report
generation state or payment calculation state.
For payment calculation, the manger gives the requirements and system
calculates the payments.
The report generation state generate report for manager which is followed by
updating state where all the records of an employee is updated
The payment calculation state goes to error recovery state in case of error. after
deletion of record state or updating of record state, the system ends the operation.
Create State Machine Diagram of the above Payroll Application, mention all events and
possible guards. Also include appropriate Entry, Do and Exit activities.