This is a console-based Java Banking System built as part of the Virtusa Full Stack Development Program Mini Project.
It demonstrates Object-Oriented Programming, Collections Framework, Multithreading, and Exception Handling in a real-world scenario.
Users can create accounts, perform deposits, withdrawals, transfers, and even simulate concurrent transactions using multiple threads.
Create a new bank account
Deposit / Withdraw / Transfer money
Show account balance
Prevent invalid or duplicate account creation
Handle errors gracefully with custom exceptions
Thread-safe operations using ConcurrentHashMap
Demonstrate multithreading with ExecutorService
Layered architecture – Model, Service, and Main packages
Functional programming (Streams / Lambda) used for validation
com/
└── bank/
├── model/
│ ├── Account.java
│ └── SavingsAccount.java (Inheritance demo)
│
├── service/
│ ├── AccountService.java (Interface – abstraction)
│ └── AccountServiceImpl.java (Implementation – polymorphism)
│
├── exceptions/
│ ├── AccountNotFoundException.java
│ ├── InvalidAmountException.java
│ ├── InvalidNameException.java
│ └── InsufficientBalanceException.java
│
├── utils/
│ └── AccountNumGenerator.java
│
└── main/
├── Main.java
├── AccountOperationsMenu.java
└── AccountOperations.java
| Concept | Description |
|---|---|
| OOP | Classes, Objects, Abstraction (Interface), Polymorphism, Encapsulation, Inheritance |
| Collections | Used ConcurrentHashMap<String, Account> for thread-safe account storage |
| Generics | Strongly typed collections (Map<String, Account>) |
| Functional Programming | Used Streams and Lambda expressions (anyMatch(), ExecutorService) |
| Multithreading | Used ExecutorService, Runnable, and synchronized blocks |
| Exception Handling | Custom exceptions with meaningful messages |
| Synchronization | Ensures thread safety during concurrent deposits/withdrawals |
| Layered Architecture | Clear separation: Model → Service → Main (UI) |
| Input Validation | Handled with try-catch and specific exception blocks |
- Create Account
- Perform Operations on Existing Account
- Exit
- Deposit
- Withdraw
- Transfer
- Show Balance
- Simulate Concurrent Transactions
- Back to Main Menu
All exceptions are handled gracefully with proper user messages.