Use Case Modeling for an ATM System: A Comprehensive Guide and Case Study

Introduction

This case study focuses on the use case modeling of an ATM system for a bank. The ATM system is designed to provide customers with a convenient way to access their accounts and perform various banking transactions, such as withdrawing cash, depositing cash, transferring funds, checking their account balance, and changing their PIN. The case study discusses the problem description and requirements of the system, as well as the use case diagrams, actors, and scenarios that were created to model the system’s functionality. The case study also explores how other types of UML diagrams, such as activity diagrams and sequence diagrams, can be used in conjunction with use case diagrams to provide a more detailed view of the system’s behavior and interactions. By the end of the case study, readers will have a clear understanding of the use case modeling process and how it can be applied to real-world systems such as an ATM system.

什麼是用例圖?Use Case Diagram - Learn it, Try it! | 學習EA, Agile & UML 和使用Visual Paradigm 技能- 點部落

 

Guidelines and Tips for Developing Effective Use Cases and Writing Proper Use Case Scenarios

Here are some guidelines, tips, and tricks for developing use cases and writing proper use case scenarios:

  1. Identify the actors: Begin by identifying the actors who will interact with the system. This could include users, administrators, and any other stakeholders who will use the system.
  2. Define the system’s scope: Clearly define the scope of the system and what it is meant to accomplish. This will help ensure that the use case scenarios capture all necessary requirements.
  3. Use a structured approach: Use a structured approach to develop the use case scenarios. This could include using templates or guidelines to ensure that each scenario follows a consistent structure.
  4. Write clear and concise scenarios: Write use case scenarios that are clear, concise, and easy to understand. Use plain language and avoid technical jargon or acronyms that may not be familiar to all stakeholders.
  5. Use action-oriented language: Write use case scenarios using action-oriented language that describes what the user or system is doing. This can help ensure that the scenarios are easy to understand and follow.
  6. Focus on user goals and needs: Focus on the user’s goals and needs when developing use case scenarios. This will help ensure that the scenarios capture the user’s perspective and are aligned with their needs.
  7. Identify pre-conditions and post-conditions: Clearly identify any pre-conditions and post-conditions that must be met for the scenario to be successful. This will help ensure that the scenario is complete and accurate.
  8. Include exception scenarios: Identify any exception scenarios that may occur and include them in the use case scenarios. This will help ensure that the system can handle unexpected situations and errors.
  9. Get feedback and review: Get feedback from stakeholders and review the use case scenarios regularly to ensure that they remain accurate and up-to-date with the latest system specifications and requirements.

By following these guidelines, tips, and tricks, developers can develop use case scenarios that accurately capture the system’s functionality and meet the needs of all stakeholders.

Problem Description of the Case Study – ATM

A bank needs to provide its customers with a convenient way to access their accounts and perform various banking transactions, such as withdrawing cash, depositing cash, transferring funds, checking their account balance, and changing their PIN. To address this problem, the bank plans to implement an ATM system that allows customers to perform these transactions using their ATM cards and a PIN.

Requirements:

  1. Security: The ATM system must ensure the security of customer transactions by verifying the customer’s identity using their ATM card and PIN. The system must prevent unauthorized access to customer accounts and must be protected against various forms of fraud and attack, such as skimming and hacking.
  2. Availability: The ATM system must be available to customers at all times, subject to periodic maintenance and downtime. The system must be reliable and resilient to hardware and software failures to minimize service disruptions and ensure a high level of customer satisfaction.
  3. Usability: The ATM system must be easy to use and navigate for customers of all ages and backgrounds. The system must provide clear instructions and feedback to guide customers through the transaction process and minimize errors and confusion.
  4. Transaction processing: The ATM system must process customer transactions accurately and efficiently, including withdrawing and depositing cash, transferring funds, checking account balances, and changing PINs. The system must maintain accurate records of all transactions and provide customers with receipts and other documentation as needed.
  5. Integration: The ATM system must integrate with the bank’s existing IT infrastructure, including its core banking system, network, and databases. The system must communicate securely and reliably with other systems and components to ensure accurate and timely processing of transactions and account information.

Use Case Modeling and Use Case Scenario Development

Starting with the problem description of an ATM system, the next step is to identify the various use cases that are required to fulfill the needs of the system’s users. This involves analyzing the system’s requirements and defining the specific actions that users can take when interacting with the system. Each use case will have its own set of scenarios that describe how the system and user will interact in specific situations. These scenarios should be developed in a structured manner, using clear and concise language to ensure they are easily understandable by all stakeholders involved in the project.

The process of identifying use cases and developing use case scenarios is a critical step in the software development life cycle. It enables the development team to fully understand the requirements of the system and to design a solution that meets the needs of its users. As the development process progresses, it may be necessary to refine the use cases and scenarios to reflect changes in the requirements or to incorporate feedback from stakeholders. This iterative process helps to ensure that the final system meets the needs of all stakeholders and is capable of handling a wide range of scenarios and use cases.

Here is an example of use case modeling for an ATM system:
  1. Use Case Diagram:

The use case diagram for an ATM system could include the following actors:

  • Customer
  • Bank

And the following use cases:

  • Withdraw Cash
  • Deposit Cash
  • Check Balance
  • Transfer Funds
  • Change PIN

The diagram would show the relationships between the actors and use cases, indicating which use cases are accessible by which actors.

  1. Use Case Scenarios:

a) Withdraw Cash:

  • The customer inserts their ATM card into the machine.
  • The system prompts the customer to enter their PIN.
  • The customer enters their PIN.
  • The system verifies the PIN.
  • The customer selects the “Withdraw Cash” option.
  • The system prompts the customer to enter the amount of cash they wish to withdraw.
  • The customer enters the amount of cash.
  • The system dispenses the cash.
  • The customer removes their ATM card and takes the cash.

b) Deposit Cash:

  • The customer inserts their ATM card into the machine.
  • The system prompts the customer to enter their PIN.
  • The customer enters their PIN.
  • The system verifies the PIN.
  • The customer selects the “Deposit Cash” option.
  • The system prompts the customer to enter the amount of cash they wish to deposit.
  • The customer enters the amount of cash.
  • The system verifies the amount and displays it to the customer.
  • The customer confirms the amount.
  • The system accepts the cash and credits the customer’s account.

c) Check Balance:

  • The customer inserts their ATM card into the machine.
  • The system prompts the customer to enter their PIN.
  • The customer enters their PIN.
  • The system verifies the PIN.
  • The system displays the customer’s account balance.

d) Transfer Funds:

  • The customer inserts their ATM card into the machine.
  • The system prompts the customer to enter their PIN.
  • The customer enters their PIN.
  • The system verifies the PIN.
  • The customer selects the “Transfer Funds” option.
  • The system prompts the customer to enter the account number to which they wish to transfer funds.
  • The customer enters the account number.
  • The system prompts the customer to enter the amount of funds they wish to transfer.
  • The customer enters the amount of funds.
  • The system verifies the amount and displays it to the customer.
  • The customer confirms the amount.
  • The system transfers the funds and displays a confirmation message to the customer.

e) Change PIN:

  • The customer inserts their ATM card into the machine.
  • The system prompts the customer to enter their current PIN.
  • The customer enters their current PIN.
  • The system verifies the current PIN.
  • The system prompts the customer to enter their new PIN.
  • The customer enters their new PIN.
  • The system prompts the customer to confirm their new PIN.
  • The customer confirms their new PIN.
  • The system updates the customer’s PIN and displays a confirmation message.

Refining Use Case Scenario – Withdraw Cash

Refining a use case scenario as the development process progresses forward is important for several reasons:

  1. To ensure that the scenario is accurate and reflects the current state of the system: As the development process moves forward, the system may change, and new requirements may emerge. Refining the use case scenario helps ensure that it remains accurate and up-to-date with the latest system specifications.
  2. To identify any missing or incomplete requirements: As the system evolves, it may become apparent that additional requirements are needed to fully capture the system’s functionality. Refining the use case scenario helps identify any missing or incomplete requirements.
  3. To improve usability and user experience: Refining the use case scenario can help improve the usability and user experience of the system. By refining the scenario, developers can better understand the user’s needs and make design decisions that better meet those needs.

The process of refining a use case scenario can involve several steps, including:

  1. Reviewing the scenario for accuracy and completeness: Developers should review the scenario to ensure that it accurately reflects the current state of the system and that all requirements are captured.
  2. Identifying any missing or incomplete requirements: Developers should identify any missing or incomplete requirements and work to incorporate them into the scenario.
  3. Refining the user interface: Developers should refine the user interface to improve usability and user experience, taking into account user feedback and design best practices.
  4. Incorporating feedback: Developers should incorporate feedback from stakeholders and users to refine the scenario and ensure that it meets the needs of all users.

Steps to Refine a Use Case Scenario

By continually refining the use case scenario throughout the development process, developers can ensure that the system meets user needs and requirements and is as usable and user-friendly as possible.

Here’s an elaboration of the “Withdraw Cash” scenario for the ATM system, including normal and exception flows and insertion points to reflect a real-life scenario:

Scenario: Withdraw Cash

Primary Actor: Customer

Preconditions:

  1. The customer has inserted their ATM card into the machine.
  2. The customer has entered their correct PIN.

Basic Flow:

  1. The customer selects the “Withdraw Cash” option from the main menu.
  2. The ATM prompts the customer to enter the amount of cash they wish to withdraw.
  3. The customer enters the amount of cash they wish to withdraw.
  4. The ATM verifies that the customer has sufficient funds in their account to cover the withdrawal amount.
  5. The ATM dispenses the requested cash to the customer.
  6. The ATM displays a message confirming the successful withdrawal and prompts the customer to select another transaction or end the session.
  7. The customer selects another transaction or ends the session.
  8. The ATM ejects the customer’s ATM card.

Exception Flows:

1a. Insufficient Funds

  1. The ATM verifies that the customer has insufficient funds in their account to cover the withdrawal amount.
  2. The ATM displays an error message informing the customer that they do not have sufficient funds to complete the transaction.
  3. The ATM prompts the customer to either enter a smaller withdrawal amount or cancel the transaction.
  4. The customer either enters a smaller withdrawal amount or cancels the transaction.

2a. Invalid Amount

  1. The customer enters an invalid withdrawal amount, such as a negative number or a value that exceeds their daily withdrawal limit.
  2. The ATM displays an error message informing the customer that the amount entered is invalid.
  3. The ATM prompts the customer to enter a valid withdrawal amount.
  4. The customer enters a valid withdrawal amount.

3a. Card Retained

  1. The ATM fails to dispense the cash due to a hardware or software error.
  2. The ATM displays an error message informing the customer that their card has been retained.
  3. The ATM prompts the customer to contact their bank or customer service for assistance.
  4. The customer contacts their bank or customer service to retrieve their card.

Insertion Points:

  1. After step 1: The customer inserts their ATM card into the machine and enters their PIN.
  2. After step 2: The customer enters the amount of cash they wish to withdraw.
  3. After step 3: The ATM verifies that the customer has sufficient funds to cover the withdrawal amount.
  4. After step 5: The ATM dispenses the requested cash to the customer.

Summary

This case study provides a comprehensive guide to use case modeling for an ATM system in a bank.
The study starts by presenting the problem description and requirements of the system, including security, availability, usability, transaction processing, and integration. Then, it explains how use case diagrams were used to model the system’s functionality, including the actors and scenarios involved.
The case study also demonstrates how other UML diagrams, such as activity diagrams and sequence diagrams, can be incorporated to provide additional detail and clarify the system’s behavior and interactions.
Overall, the case study provides readers with a clear understanding of the use case modeling process and how it can be applied to real-world systems.

Appendix – Refined Use Case Scenarios – ATM

Use Case Name: Withdraw Cash

Actors: Customer, ATM

Preconditions: The customer must have a valid ATM card and PIN number. The ATM must be functioning properly and connected to the banking network.

Basic Flow:

  1. The customer inserts their ATM card into the card reader slot on the ATM.
  2. The ATM prompts the customer to enter their PIN number using the keypad.
  3. The customer enters their PIN number.
  4. The ATM validates the PIN number and displays the main menu options.
  5. The customer selects the “Withdraw Cash” option from the menu.
  6. The ATM prompts the customer to enter the amount of cash they wish to withdraw using the keypad.
  7. The customer enters the amount of cash they wish to withdraw.
  8. The ATM validates that the customer has sufficient funds in their account to complete the transaction.
  9. The ATM dispenses the requested cash amount to the customer.
  10. The ATM displays a message indicating that the transaction is complete.
  11. The customer removes their ATM card from the card reader slot.

Alternative Flows:

  • 1a. If the ATM is unable to read the customer’s ATM card, the ATM displays an error message and prompts the customer to try again or contact their bank.
  • 4a. If the customer enters an incorrect PIN number three times, the ATM will retain their card and display a message indicating that it has been retained.
  • 8a. If the customer does not have sufficient funds in their account to complete the transaction, the ATM displays an error message and prompts the customer to enter a smaller amount or cancel the transaction.

Use Case Name: Check Account Balance

Actors: Customer, ATM

Preconditions: The customer must have a valid ATM card and PIN number. The ATM must be functioning properly and connected to the banking network.

Basic Flow:

  1. The customer inserts their ATM card into the card reader slot on the ATM.
  2. The ATM prompts the customer to enter their PIN number using the keypad.
  3. The customer enters their PIN number.
  4. The ATM validates the PIN number and displays the main menu options.
  5. The customer selects the “Check Account Balance” option from the menu.
  6. The ATM displays the customer’s current account balance on the screen.
  7. The customer removes their ATM card from the card reader slot.

Alternative Flows:

  • 1a. If the ATM is unable to read the customer’s ATM card, the ATM displays an error message and prompts the customer to try again or contact their bank.
  • 4a. If the customer enters an incorrect PIN number three times, the ATM will retain their card and display a message indicating that it has been retained.

Use Case Name: Deposit Cash

Actors: Customer, ATM

Preconditions: The customer must have a valid ATM card and PIN number. The ATM must be functioning properly and connected to the banking network.

Basic Flow:

  1. The customer inserts their ATM card into the card reader slot on the ATM.
  2. The ATM prompts the customer to enter their PIN number using the keypad.
  3. The customer enters their PIN number.
  4. The ATM validates the PIN number and displays the main menu options.
  5. The customer selects the “Deposit Cash” option from the menu.
  6. The ATM prompts the customer to insert the cash they wish to deposit into the cash deposit slot on the ATM.
  7. The customer inserts the cash into the deposit slot.
  8. The ATM validates the cash and displays a message indicating the amount of cash that has been deposited.
  9. The customer removes their ATM card from the card reader slot.

References: Use Case Modeling Techniques