Skip to content

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

Notifications You must be signed in to change notification settings

mugdhachalla/console-based-banking-system

Repository files navigation

Console Based Banking System (Java)

Overview

This project is a console based banking system implemented in Java to demonstrate core programming fundamentals, object oriented design, and clean control flow.
The application allows users to create bank accounts and perform basic banking operations through a menu driven interface.

The project is intentionally kept simple and focused on Java fundamentals, without external libraries, databases, or graphical interfaces.


Features

  • Create a new bank account
  • Access an existing account using account number
  • Deposit money
  • Withdraw money with insufficient balance handling
  • Check account balance
  • Menu driven user interaction

Key Concepts Demonstrated

  • Object Oriented Programming (classes, objects, encapsulation)
  • Separation of concerns across multiple classes
  • Use of collections (HashMap) for in memory data storage
  • Custom exception handling (InsufficientFundsException)
  • Menu driven control flow using loops and switch statements
  • Basic input handling using Scanner

Project Structure

  • Bank.java
  • BankAccount.java
  • BankService.java
  • AccountMenu.java
  • InsufficientFundsException.java

Class Responsibilities

Bank

Entry point of the application. Handles high level user flow and menu navigation.

BankAccount

Represents an individual bank account and manages balance related operations.

BankService

Manages account creation and retrieval using a HashMap.

AccountMenu

Handles deposit, withdrawal, and balance check operations for an accessed account.

InsufficientFundsException

Custom exception to handle withdrawal attempts exceeding available balance.


How It Works

  1. User selects an option from the main menu
  2. For account creation, a unique account number is generated
  3. Accounts are stored in memory during program execution
  4. Users can access accounts and perform operations in the same session
  5. Data persists only while the program is running

Design Decisions

  • Data is stored in memory using a HashMap to keep the project focused on core Java concepts
  • No database or file storage is used
  • Menu logic is modularized to avoid code repetition
  • Exception handling is implemented to manage invalid withdrawal attempts

How to Run

  1. Clone the repository
  2. Compile all Java files
  3. Run the Bank class
javac Bank.java
java Bank

Future Improvements

  • Add file based persistence or database support
  • Improve input validation
  • Introduce user authentication
  • Add interest calculation

Learning Outcome

This project strengthened understanding of Java fundamentals, object oriented design, exception handling, and writing modular, maintainable code.

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