β Account Management System
A simple console-based bank account management system written in Java. Demonstrates OOP concepts (classes, encapsulation), collections, and basic banking operations: create account, deposit, withdraw, transfer, and list accounts.
β¨ Features
β Create new accounts (account number, holder name, initial balance)
π° Deposit money to an account, you can use multiple accounts.
β Withdraw money from an account (with basic validation)
π Transfer money between accounts
π Show a single account's details
π Show all accounts stored in memory
π Tech Stack
π§Ύ Language: Java
βοΈ Runtime: Java 8+ (Java 11+ recommended)
π¦ No external libraries β uses standard Java packages
π Project Structure AccountManagementSystem.java // contains Account, AccountManager and main class README.md output.png
βΉοΈ All classes are bundled in one file for simplicity. You can split them into Account.java, AccountManager.java, and AccountManagementSystem.java later.
Open terminal/command prompt in project folder and run:
javac AccountManagementSystem.java
java AccountManagementSystem
If you split classes into separate files:
javac *.java java AccountManagementSystem
To create and run a JAR (optional):
javac *.java
jar cfe AccountManagementSystem.jar AccountManagementSystem *.class
java -jar AccountManagementSystem.jar
π§Ύ Usage example (sample session) ---- Account Management System ----
- Create Account
- Deposit
- Withdraw
- Transfer
- Show Account
- Show ALL Accounts
- Exit Enter your choice: 1 Enter Account No: A001 Enter Holder Name: Rahul Kumar Enter Initial Balance: 5000 Account created successfully!
Enter your choice: 2 Enter Account No: A001 Enter Amount to Deposit: 1500 Deposited: 1500.0
Enter your choice: 6 Account No: A001 | Holder: Rahul Kumar | Balance: 6500.0
Exiting... Goodbye!
β Validation & error handling
π‘ Catches InputMismatchException to handle invalid numeric inputs without crashing.
β Validates amounts (e.g., deposit > 0, withdraw <= balance).
π Data is stored in memory using a HashMap β all data is lost when the program exits.
π Possible improvements (TODO)
πΎ Persist accounts to disk (JSON, CSV, or serialization) so data persists between runs.
π Add account authentication (PIN/password).
π Split classes into separate files and add unit tests.
π Replace System.out.println with logging.
π₯ Build a GUI (Swing/JavaFX) or a web UI (Spring Boot).
βοΈ Add concurrency control for multi-threaded use.
.gitignore suggestions *.class *.jar *.log .DS_Store
For full source code, you can mail me.
π License
This project can be released under the MIT License. Add a LICENSE file with the full license text if you choose MIT.
π€ Author
Anish Raj