use case diagram example,
I’ll describe a use case diagram example for an ATM (Automated Teller Machine) system, as it’s a familiar concept for many:
- Bank Customer
- Bank System
- Withdraw Cash: The customer can withdraw money from their account.
- Deposit Money: The customer can deposit money into their account.
- Check Balance: The customer can view the current balance in their account.
- Change PIN: The customer can change their ATM PIN.
- Print Mini Statement: The customer can print a mini statement for their recent transactions.
- Transfer Money: The customer can transfer money to another account.
- Notify on Withdrawal: The Bank System notifies the customer after a successful withdrawal.
- Actors Representation:
- The Bank Customer would be represented as a stick figure on the left side.
- The Bank System would be another stick figure, representing systems or services that interact with the ATM but aren’t directly controlled by it.
- Use Cases Representation:
- Each use case, such as “Withdraw Cash” or “Deposit Money,” would be represented as ellipses inside a rectangle. The rectangle represents the boundary of the ATM system.
- Lines would be drawn from the Bank Customer actor to each use case they can perform, such as “Withdraw Cash,” “Deposit Money,” “Check Balance,” “Change PIN,” “Print Mini Statement,” and “Transfer Money.”
- A line would be drawn from the Withdraw Cash use case to the Notify on Withdrawal use case to indicate that once money is withdrawn, a notification is sent.
- If, for instance, every time a “Withdraw Cash” operation is done, a “Check Balance” operation is automatically triggered, an “Include” relationship can be shown from “Withdraw Cash” to “Check Balance.”
- If “Transfer Money” has an optional step for adding a note or memo to the transfer, an “Extend” relationship could be drawn from “Transfer Money” to a use case named “Add Transfer Note.”
This is a basic overview of what the use case diagram for an ATM system might look like. In a real-world scenario, there could be additional complexities, more actors, and more use cases, depending on the depth and detail of the system being modeled.