Semester
Subject
Year
Tribhuwan University
2079
Bachelor Level / Third Year / Fifth Semester / Science
(Software Engineering)
Full Marks: 60
Pass Marks: 24
Time: 3 Hours
Candidates are required to give their answers in their own words as for as practicable.
The figures in the margin indicate full marks.
Long Answers Questions
Event-driven modeling is a system modeling approach that shows how a system responds to external and internal events by transitioning between different states based on stimuli received.
Event-driven modeling focuses on how the system reacts to events — occurrences that trigger a change in the system's state. Unlike data-flow models that focus on data transformations, event-driven models emphasize the stimuli (events) and the system's responses to those stimuli.
Key Characteristics:
Components of an Event-Driven Model:
Consider an ATM (Automated Teller Machine) system modeled using event-driven approach:
States: Idle → Card Inserted → PIN Verification → Transaction Selection → Processing → Dispensing Cash → Idle
State Machine Description (in words):
| Current State | Event (Stimulus) | Next State | Action |
|---|---|---|---|
| Idle | Card inserted | Card Inserted | Read card data |
| Card Inserted | PIN entered | PIN Verification | Validate PIN |
| PIN Verification | PIN correct | Transaction Selection | Display menu |
| PIN Verification | PIN incorrect (3 times) | Idle | Eject/retain card |
| Transaction Selection | Withdrawal selected | Processing | Check balance |
| Processing | Sufficient balance | Dispensing Cash | Dispense money |
| Dispensing Cash | Cash taken | Idle | Eject card, print receipt |
Diagram Description (State Chart):
Event-driven modeling is essential for systems where the behavior depends on external stimuli rather than sequential data processing. It provides a clear, visual representation of how a system moves between states in response to events, making it invaluable for designing real-time, embedded, and interactive systems.
Short Answers Questions