Skip to content

mugdhachalla/console-based-banking-system

Repository files navigation

Console-Based Banking System (Java)

Overview

This is a simple console banking application written in Java. It demonstrates object-oriented design, menu-driven flow, and exception handling using an in-memory account store.

All logic is currently implemented in a single source file: Bank.java.

Features

  • Create a new account with name and initial balance
  • Auto-generate account numbers (starting from 1000)
  • Access existing accounts using account number
  • Deposit money
  • Withdraw money
  • Check current balance
  • Handle common errors gracefully:
    • negative/zero deposit or withdrawal
    • negative initial balance
    • insufficient balance
    • invalid menu choices

Current Structure

The project currently contains:

  • Bank.java

Inside Bank.java, the following classes are defined:

  • InsufficientFundsException
  • BankAccount
  • BankService
  • AccountMenu
  • Bank (main entry point)

How It Works

  1. User sees the main menu:
    • Create new account
    • Access existing account
    • Exit
  2. On account creation, a new account number is generated and stored in memory.
  3. After creating or opening an account, user enters account operations menu:
    • Deposit
    • Withdraw
    • Check balance
    • Exit
  4. Data is stored only for the current runtime session.

Run Instructions

Compile and run:

javac Bank.java
java Bank

Notes

  • No database or file persistence is used.
  • Accounts are stored in a HashMap<Integer, BankAccount>.
  • This project is intended for Java fundamentals practice.

About

Java console application demonstrating object oriented programming, data encapsulation, and exception handling through basic banking operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages