Case Study: ATM machine I. Amalia Foka CEID - University of Patras Object Oriented Programming II (C++) Fall 2010-2011



Similar documents
ATM Case Study Part 1

ATM Case Study OBJECTIVES Pearson Education, Inc. All rights reserved Pearson Education, Inc. All rights reserved.

Example Use Case Specification:

Writing Use Case Scenarios for Model Driven Development

How to Make a Domain Model. Tutorial

Requirements Document for the Banking System. Lecture # 40

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

Basic Banking. 2) Money that a bank allows you to borrow and pay back with interest

CONSUMER ELECTRONIC FUNDS TRANSFER AND DEBIT CARD AGREEMENT

Welcome. 1. Agenda. 2. Ground Rules. 3. Introductions. Check It Out 2

ATM Card user s guide

Taking Credit & Debit Card Payments with PayPros

Client s Guide to Enhanced Banking Services

Many of these tips are just common sense and others are tips to keep in mind when doing a transaction, at ATMs, restaurants and merchants.

DEBIT CARD AGREEMENT AND DISCLOSURE

ipayu TM Prepaid MasterCard FREQUENTLY ASKED QUESTIONS

Cash Deposit & Bill Payment Machine

Using my PAYCHEK PLUS!

Unemployment Insurance U.S. Bank ReliaCard. Frequently Asked Questions. What is the ReliaCard and How Does It Work?

LAB 3: Introduction to Domain Modeling and Class Diagram

Object Oriented Software Models

VX 680 USER GUIDE. 001 Rev 1. VeriFone

Using Banking Services

FIRST FINANCIAL BANK, N.A. DEBIT CARD AGREEMENT EFFECTIVE AUGUST 1, 2013 ATM/VISA CHECK CARD TERMS AND CONDITIONS

PAYROLL CARD FREQUENTLY ASKED QUESTIONS

HSBC Bank USA, N.A All rights reserved. Your guide to the HSBC Security Device

QUICK REFERENCE CHIP CARD TRANSACTION

Card & Intesa Sanpaolo Bank Albania Network Frequently Asked Questions

Credit Card Conditions of Use. Credit Guide.

ANZ EFTPOS card and ANZ Visa Debit card

Electronic Fund Transfers Disclosure

Cash Back FAQs on txu.com

Checking Accounts. Open, Manage, and Reconcile

MAKING DECISIONS ABOUT MONEY INCLUSION IRELAND. Promoting the rights of people with an intellectual disability

Interaction Diagrams. Use Cases and Actors INTERACTION MODELING

Frequently Asked. Questions. Cash Solution TM PIN Prepaid Debit Card

credit card Your Welcome Guide

BANK OF BARODA (NEW ZEALAND) LIMITED (BOBNZ) VISA CLASSIC DEBIT CARD. User Guide

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Personal Online Banking & Bill Pay. Guide to Getting Started

ELECTRONIC FUNDS TRANSFER AGREEMENT AND DISCLOSURE

Your Step by Step Guide Follow these simple steps when using our alternative channels

*DD8108* ELECTRONIC FUND TRANSFER DISCLOSURE

DEBIT MASTERCARD APPLICATION

About Your Gift Card

QUICK REFERENCE GUIDE Electronic Gift Card

Travel Card. Cardholder Frequently Asked Questions. June 2014 T.FQ.S E

Bank Reconciliation: Improvements for the Shelby v5 Spring 2006 Release

David Jones Storecard and David Jones American Express Card Member Agreement, Financial Services Guide and Purchase Protection. Terms and Conditions

VERITY CREDIT UNION VISA CHECK/ATM CARD AGREEMENT AND DISCLOSURE

Getting and Keeping A Checking Account

Ease-E-Club Client Management Software by Computerease

credit card Your Welcome Guide

Your new checking account

ELECTRONIC FUND TRANSFERS YOUR RIGHTS AND RESPONSIBILITIES

SPECIFIC TERMS APPLICABLE TO YOUR HIGH YIELD CHECKING ACCOUNT

Your Louisiana Purchase Card

Why do you need my Social Security Number and other personal information when I enroll for an I.C.E. card?

ELECTRONIC BANKING SERVICES INFORMATION STATEMENT

BANKING BASICS WHY YOU WANT TO KEEP YOUR MONEY IN THE BANK

Wire Transfer Services, Interactive Voice Response System

Pulaski Bank. Electronic Funds Transfer ELECTRONIC FUND TRANSFER AGREEMENT AND DISCLOSURE

FBFCU VISA PREPAID DEBIT CARD FREQUENTLY ASKED QUESTIONS (FAQs)

Frontier State Bank ELECTRONIC FUNDS TRANSFER

Visa Reloadable Frequently Asked Questions. EMV Travel Card

Important Information About Your Card Agreement and Disclosure. Community Bank Debit Card / ATM Card Effective June 19, 2015

ELECTRONIC FUND TRANSFER AGREEMENT AND DISCLOSURE

Sofware Requirements Engineeing

IMPORTANT ACCOUNT INFORMATION FOR OUR CUSTOMERS from. The Roscoe State Bank 117 Cypress St. Roscoe, TX (325)

DEBIT CARD AGREEMENT AND DISCLOSURE

FUNDS TRANSFER AGREEMENT AND DISCLOSURES

Arlington Community Federal Credit Union P.O. Box Arlington, VA (703)

Independent Bank 230 W Main St Ionia, MI ELECTRONIC FUND TRANSFER AGREEMENT AND DISCLOSURE

through ATM Machine 1* Mohd. Arif Siddique and 2 Dr. Amit Kumar Awasthi

Virginia Tax Refund Debit Card Frequently Asked Questions for the Virginia Banking Community

HSBC Visa Debit Card. Making the most of your card. HSBC Customer Service Centre. Go to hsbc.com.au/debit

Once you are logged in to Online Banking Cash Management, you will be directed to the Online Banking main page.

YOUR GUIDE TO THE iphone MOBILE APP WITH 1st SOURCE

MANUAL. Service Point. In case of additional questions, please contact Satellic Customer Support on

Electronic Funds Transfers

REGULATION E DISCLOSURE

How To Use A Credit Card At A Bank Account At A Credit Union

IMPORTANT ACCOUNT INFORMATION FOR OUR CUSTOMERS from. First National Bank 729 W 7th (Home Office) SPEARMAN, TX (806)

Q3: I want to transfer money between my Hong Leong Current/ Savings accounts OR to other Hong Leong Current/ Savings accounts.

ELECTRONIC BANKING SERVICES INFORMATION STATEMENT

Business Banking Reference Guide. The Works: Getting the most from your Business Account

Credit Card Conditions of Use. Credit Guide.

Abington Bank 6 Harrison Avenue Abington, MA TheAbingtonBank.com ELECTRONIC FUND TRANSFER AGREEMENT AND DISCLOSURE

WESTMORELAND COMMUNITY FEDERAL CREDIT UNION DEBIT CARD AGREEMENT AND DISCLOSURE

Unemployment Insurance Weekly Claims Filing Instructions. Easy Call. Revised May 2009 LOUISIANA

ELECTRONIC FUND TRANSFERS YOUR RIGHTS AND RESPONSIBILITIES

Electronic Funds Transfer

ELECTRONIC FUND TRANSFERS Your Rights & Responsibilities (Visa, Automated Teller Machines, EFT, ACH, TAP, Home Banking, etc.)

EFT Services. If approved, you may conduct any one or more of the EFT services offered by the Credit Union.

Business Banking Switch Kit. Getting Started

FUNDS AVAILABILITY POLICY DISCLOSURE

Transcription:

Case Study: ATM machine I Amalia Foka CEID - University of Patras Object Oriented Programming II (C++) Fall 2010-2011

Requirements Document An ATM allows users to perform basic financial transactions view their account balance withdraw cash deposit funds Each user can have only one account at the bank

User Interface a screen to displays messages a keypad for numeric input a cash dispenser a deposit slot

ATM session The cash dispenser begins each day loaded with 500 $20 bills. Authenticating a user based on account number and (PIN) bank's account information database stores an account number, a PIN and a balance

ATM Session Display a welcome message and prompt the user to enter an account number. The user enters a five-digit account number, using the keypad. The screen prompts the user to enter the PIN The user enters a five-digit PIN, using the keypad. If the user enters a valid account number and the correct PIN for that account, the screen displays the main menu. If the user enters an invalid account number or an incorrect PIN, the screen displays an appropriate message, then the ATM returns to Step 1 to restart the authentication process.

ATM Main menu When an invalid option is entered, display an error message, then redisplay the main menu

1 View My Balance displays the user's account balance. the ATM retrieves the balance from the bank's database

2 Withdraw Cash Display withdrawal menu

2 Withdraw Cash withdrawal amount greater than balance Display message, ask for smaller amount Choose option to exit Display main menu

2 Withdraw Cash Valid withdrawal amount is valid Authenticate user ask for pin If amount > than ATM money in dispenser Display message to ask for smaller amount Display Withdrawal menu Debit the withdraw amount for balance in database Dispense the money Display a message reminding the user to take the money

3 Deposit Funds Prompts user to enter a deposit amount or 0 (zero) to cancel the transaction. User enters a deposit amount or 0 the amount is entered as a number of cents (e.g., 125). The ATM divides this number by 100 to obtain a dollar amount (e.g., 125 100 = 1.25). Displays a message telling the user to insert a deposit envelope into the deposit slot If the slot receives a deposit envelope within two minutes, the ATM credits the amount to the balance in the bank's database. This money is not immediately available for withdrawal. First the bank verifies the amount and then updates the balance stored in the database. If the slot does not receive an envelope within two minutes display a message that the transaction is cancelled due to inactivity. The ATM then displays the main menu and waits for user input.

ATM Session When a transaction is executed redisplay the main menu If the user chooses to exit the system display a thank you message then display the welcome message for the next user.

Design Stage I Use case diagrams model the interactions between a system and its external entities (actors) in terms of use cases system capabilities, such as "View Account Balance," "Withdraw Cash" and "Deposit Funds"

Use Case Diagrams Use Case Diagram model the interactions between a system's clients (bank customers) and the system produced during the analysis stage of the software life cycle

Use Case Diagrams Actor defines the roles that an external entity such as a person or another system plays when interacting with the system

Design Stage II Class diagrams model the classes, or "building blocks," used in a system. Each noun or "thing" described in the requirements document is a candidate to be a class in the system (e.g., "account," "keypad"). Class diagrams help specify the structural relationships between parts of the system.

Identifying the Classes find key nouns and noun phrases to help us identify classes that comprise the ATM system

Identifying the Classes Create classes only for the nouns and noun phrases that have significance in the ATM system We do not need to model "bank" as a class the bank is not a part of the ATM system "Customer" and "user" also represent entities outside of the system they are important because they interact with our ATM system, but we do not need to model them as classes in the ATM software. We modeled an ATM user (i.e., a bank customer) as the actor in the use case diagram.

Identifying the Classes Create classes only for the nouns and noun phrases that have significance in the ATM system We do not need to model "bank" as a class the bank is not a part of the ATM system "Customer" and "user" also represent entities outside of the system they are important because they interact with our ATM system, but we do not need to model them as classes in the ATM software. We modeled an ATM user (i.e., a bank customer) as the actor in the use case diagram.

Identifying the Classes We do not model "$20 bill" or "deposit envelope" as classes. These are physical objects in the real world, but they are not part of what is being automated. We can adequately represent the presence of bills in the system using an attribute of the class that models the cash dispenser. For example, the cash dispenser maintains a count of the number of bills it contains. The requirements document does not say anything about what the system should do with deposit envelopes after it receives them. We can assume that simply acknowledging the receipt of an envelope an operation performed by the class that models the deposit slot is sufficient to represent the presence of an envelope in the system.

Identifying the Classes money, balance attributes of other classes seems most appropriate "account number, "PIN" important attributes of a bank account. They do not exhibit behaviors. Model them as attributes of an account class. "transaction" We do not model the broad notion of a financial transaction at this time. Instead, we model the three types of transactions as individual classes. "balance inquiry," "withdrawal" and "deposit" Later we "factor out" common features of all transactions into a general "transaction" class using the object-oriented concepts of abstract classes and inheritance

Candidate Classes ATM screen keypad cash dispenser deposit slot account bank database balance inquiry withdrawal deposit

Candidate Classes ATM Screen Keypad CashDispenser DepositSlot Account BankDatabase, BalanceInquiry Withdrawal Deposit

UML Class Diagram Each class modeled as a rectangle with three compartments. The top compartment contains the name of the class, centered horizontally and in boldface. The middle compartment contains the class's attributes. The bottom compartment contains the class's operations

UML Class Diagram the solid line that connects the two classes represents an association relationship between classes The numbers near each end of the line are multiplicity values, which indicate how many objects of each class participate in the association. at any given moment, one ATM object participates in an association with either zero or one Withdrawal objects. An association can be named. association names are directional, as indicated by the filled arrow-head "one object of class ATM executes zero or one objects of class Withdrawal.

UML Class Diagram Role name currenttransaction indicates that the Withdrawal object participating in the Executes association with an object of class ATM represents the transaction currently being processed by the ATM. In other contexts, a Withdrawal object may take on other roles (e.g., the previous transaction). we do not specify a role name for the ATM end of the Executes association. Role names in class diagrams are often omitted when the meaning of an association is clear without them.

Multiplicity Types

UML composition relationship

UML composition relationship solid diamonds attached to the association lines of class ATM indicate that class ATM has a composition relationship with classes Screen, Keypad, CashDispenser and DepositSlot. Composition implies a whole/part relationship. The class that has the composition symbol (the solid diamond) on its end of the association line is the whole (in this case, ATM), the classes on the other end of the association lines are the parts in this case, classes Screen, Keypad, CashDispenser and DepositSlot. An object of class ATM is formed from one object of class Screen, one object of class CashDispenser, one object of class Keypad and one object of class DepositSlot. The ATM "has a" screen, a keypad, a cash dispenser and a deposit slot. The "has-a" relationship defines composition.

UML composition relationship properties Only one class in the relationship can represent the whole (i.e., the diamond can be placed on only one end of the association line). For example, either the screen is part of the ATM or the ATM is part of the screen, but the screen and the ATM cannot both represent the whole in the relationship. The parts in the composition relationship exist only as long as the whole, and the whole is responsible for the creation and destruction of its parts. For example, the act of constructing an ATM includes manufacturing its parts. Furthermore, if the ATM is destroyed, its screen, keypad, cash dispenser and deposit slot are also destroyed. A part may belong to only one whole at a time, although the part may be removed and attached to another whole, which then assumes responsibility for the part.

UML composition relationship properties hollow diamonds can be attached to the ends of association lines to indicate Aggregation a weaker form of composition For example, a personal computer and a computer monitor participate in an aggregation relationshipthe computer "has a" monitor, but the two parts can exist independently, and the same monitor can be attached to multiple computers at once, thus violating the second and third properties of composition.

Class diagram for the ATM system model