Package com.myBank

Class ATM


public class ATM extends Bank
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 Details

    • currentUser

      private UserAccount currentUser
      Stores the current user session after successful login.
  • Constructor Details

    • ATM

      ATM()
      Constructs a new ATM instance 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.