A use case diagram can summarize the details of your system’s users (also known as actors) and their interactions with the system.
USE CASE – ATM
Actors:
-
- ATM Customer
- ATM Operator
Use Cases:
- The customer can
- withdraw funds from a checking or savings account
- query the balance of the account
- transfer funds from one account to another
- The ATM operator can
- Shut down the ATM
- Replenish the ATM cash dispenser
- Start the ATM
Validate PIN is an Inclusion Use Case
- It cannot be executed on its own
- Must be executed as part of a Concrete Use Case
On the other hand, a Concrete Use Case can be executed
USE CASE – VALIDATE PIN (1)
- Use case name: Validate PIN
- Summary: System validates customer PIN
- Actor: ATM Customer
- Precondition: ATM is idle, displaying a Welcome message.
USE CASE – VALIDATE PIN (2)
Main sequence:
- Customer inserts the ATM card into the card reader.
- If system recognizes the card, it reads the card number.
- System prompts customer for PIN.
- Customer enters PIN.
- System checks the card’s expiration date and whether the card has been reported as lost or stolen.
- If card is valid, system then checks whether the userentered PIN matches the card PIN maintained by the system.
- If PIN numbers match, system checks what accounts are accessible with the ATM card.
- System displays customer accounts and prompts customer for transaction type: withdrawal, query, or transfer.
USE CASE – VALIDATE PIN (3)
Alternative sequences:
Step 2: If the system does not recognize the card, the system ejects the card.
Step 5: If the system determines that the card date has expired, the system confiscates the card.
Step 5: If the system determines that the card has been reported lost or stolen, the system confiscates the card.
Step 7: If the customer-entered PIN does not match the PIN number for this card, the system re-prompts for the PIN.
Step 7: If the customer enters the incorrect PIN three times, the system confiscates the card. Steps 4-8: If the customer enters Cancel, the system cancels the transaction and ejects the card. Postcondition: Customer PIN has been validated.
USE CASE – WITHDRAW FUNDS (1) Use case name: Withdraw Funds
Summary: Customer withdraws a specific amount of funds from a valid bank account.
Actor: ATM Customer
Dependency: Include Validate PIN use case.
Precondition: ATM is idle, displaying a Welcome message.
USE CASE – WITHDRAW FUNDS (2)
Main sequence:
- Include Validate PIN use case.
- Customer selects Withdrawal, enters the amount, and selects the account number.
- System checks whether customer has enough funds in the account and whether the daily limit will not be exceeded.
- If all checks are successful, system authorizes dispensing of cash.
- System dispenses the cash amount.
- System prints a receipt showing transaction number, transaction type, amount withdrawn, and account
- System ejects card.
- System displays Welcome message
USE CASE – WITHDRAW FUNDS (3)
Alternative sequences:
Step 3: If the system determines that the account number is invalid, then it displays an error message and ejects the card.
Step 3: If the system determines that there are insufficient funds in the customer’s account, then it displays an apology and ejects the card.
Step 3: If the system determines that the maximum allowable daily withdrawal amount has been exceeded, it displays an apology and ejects the card.
Step 5: If the ATM is out of funds, the system displays an apology, ejects the card, and shuts down the ATM.
Postcondition: Customer funds have been withdrawn (only for the main sequence).
2.Library Management System
Here, we will understand the designing use case diagram for the library management system. Some scenarios of the system are as follows :
- User who registers himself as a new user initially is regarded as staff or student for the library system.
- For the user to get registered as a new user, registration forms are available that is needed to be fulfilled by the user.
- After registration, a library card is issued to the user by the librarian. On the library card, an ID is assigned to cardholder or user.
- After getting the library card, a new book is requested by the user as per there requirement.
- After, requesting, the desired book or the requested book is reserved by the user that means no other user can request for that book.
- Now, the user can renew a book that means the user can get a new due date for the desired book if the user has renewed them.
- If the user somehow forgets to return the book before the due date, then the user pays fine. Or if the user forgets to renew the book till the due date, then the book will be overdue and the user pays fine.
- User can fill the feedback form available if they want to.
- Librarian has a key role in this system. Librarian adds the records in the library database about each student or user every time issuing the book or returning the book, or paying fine.
- Librarian also deletes the record of a particular student if the student leaves the college or passed out from the college. If the book no longer exists in the library, then the record of the particular book is also deleted.
- Updating database is the important role of Librarian.
Use case Diagram only
1. Class Registration
2. ATM
3. Hospital