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: 


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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
