Package com.myBank
Class ATM
java.lang.Object
com.myBank.bankServer.Bank
com.myBank.ATM
The
ATM class represents the core functionality of an Automated Teller Machine (ATM) interface.
It extends the Bank class, providing access to bank operations such as account creation, login,
balance checking, deposits, withdrawals, money transfers, and account management.
Features:
- Create a new user account. - Login to an existing account. - Perform banking operations such as checking balance, withdrawing, depositing, and transferring money. - Update or delete user accounts. - Exit the application gracefully.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate UserAccountStores the current user session after successful login. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidInitializes the ATM interface, allowing users to create accounts, login, or exit the program.private voidlogin()Handles the user login process by prompting for account number and password.private voidDisplays the user panel with banking options after successful login.Methods inherited from class com.myBank.bankServer.Bank
createAccount, deleteAccount, getAccountNumber, getBalance, getUserAccount, getUsername, transferMoney, updateAccount, updateBalance, validateUser
-
Field Details
-
currentUser
Stores the current user session after successful login.
-
-
Constructor Details
-
ATM
ATM()Constructs a newATMinstance and initializes the ATM interface.
-
-
Method Details
-
initializeAtm
private void initializeAtm()Initializes the ATM interface, allowing users to create accounts, login, or exit the program. It handles menu navigation and ensures valid user input. -
userPanel
private void userPanel()Displays the user panel with banking options after successful login. Provides options for checking balance, withdrawing, depositing, transferring, updating, or deleting the account. It also offers the option to return to the main menu or exit the program. -
login
private void login()Handles the user login process by prompting for account number and password. Repeats the process until valid credentials are entered.
-