Question: Design and develop a Java program for an ATM machine. Your program must contain more than one class. Each AccountHolder have particular details such as

Design and develop a Java program for an ATM machine. Your program must contain more than one class. Each AccountHolder have particular details such as name, ic number, address, phone number. AccountHolder can have multiple SavingAccount and CurrentAccount. SavingAccount has minimum account balance limit of RM20.00 while CurrentAccount has minimum account balance limit of RM0.00. Both accounts having methods checkBalance, withdraw and deposit. BalanceNotSuffientException is new Exception class used within method withdraw to ensure AccountHolder does not left balance less than the minimum limit. ATMCard able to access account holders BankAccount in the same bank through auto-teller machine (ATM) by verifying the ATM card number and pin number whether they are match or not. BankAccounts having methods to instantiate list of ATMCard objects. Add an input validation in your program code and other appropriate exceptions. Below are classes that been used in this example: Design and develop a Java program for an ATM machine. Your program

must contain more than one class. Each AccountHolder have particular details such

as name, ic number, address, phone number. AccountHolder can have multiple SavingAccount

Account Below are classes that been used in this example: AccountHolder SavingAccount name AccountHolder icNumber account Number address type = "Saving" phoneNumber balance minLimit = 20.00 checkBalance() withdraw() deposit() CurrentAccount AccountHolder account Number type = "Current" balance minLimit = 0.00 checkBalance() withdraw() deposit() checkBalance() withdraw() deposit() ATMMachine BankAccount Account Holder ArrayList ATMCard atmNumber; pinNumber; BankAccount; BankAccounts ArrayList HashMap main() BalanceNotSufficientException Below are example output: run: **Welcome To UTeM Auto Teller Machine** Enter ATM Card Number : 70012345678 Enter Pin Number : 12345 Welcome Ilham Bin Yusof Please choose bank account for transaction. [1] 8223179 Saving 10000.0 [2] 4388625 Saving 20000.0 [3] 7505295 Current 30000.0 Select account : 1 Please choose transaction. [1] Check Balance (2) Withdraw [3] Deposit [4] Change Account [5] Personal Details [6] Exit ] Select transaction : Please choose transaction. [1] Check Balance [2) Withdraw [9] Deposit [4] Change Account IS) Personal Details 16) Exit Select transaction : 1 Your account balance : 10000.0 Please choose transaction. [1] Check Balance 12) withdraw [3] Deposit [4] Change Account [S] Personal Details 16) Exit Belect transaction : 2 Your account balance 10000.0 Enter amount to withdraw 1 500 Your current count balance 9500.0 Please choose transaction [1] Check Balance [2] Withdraw (31 Deposit [4] Change Account [5] Personal Details [6] Exit Select transaction 2 Your account balance 19500.0 Enter amount to withdraw : 20000 Balance not sufficient for withdrawal Your current account balance : 19500.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!