https://github.com/johnntirintis/bank-application
Java-based simulation of a banking system with support for various account types and operations, demonstrating principles of OOP and exception handling
https://github.com/johnntirintis/bank-application
banking-system java object-oriented-programming oop
Last synced: 7 days ago
JSON representation
Java-based simulation of a banking system with support for various account types and operations, demonstrating principles of OOP and exception handling
- Host: GitHub
- URL: https://github.com/johnntirintis/bank-application
- Owner: JohnNtirintis
- Created: 2023-06-16T12:03:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T08:27:11.000Z (over 2 years ago)
- Last Synced: 2025-06-17T01:05:45.554Z (4 months ago)
- Topics: banking-system, java, object-oriented-programming, oop
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Simple Banking System in Java
This repository contains a basic simulation of a banking system implemented in Java. The project demonstrates the principles of Object-Oriented Programming (OOP) such as inheritance and encapsulation.
## Description
The system supports operations like deposit and withdrawal for different types of bank accounts: Regular, Overdraft, and Joint Overdraft. It includes validation checks and custom exceptions for various potential issues such as insufficient balance, invalid social security numbers, or withdrawal amounts.
### The main classes included in the project are:
1. `User`: Represents a user or account holder with properties like first name, last name, and social security number.
2. `Account`: Represents a bank account with operations like deposit and withdrawal.
3. `JointAccount`: Inherits from `Account` and represents a bank account jointly held by two users.
4. `OverdraftAccount`: Inherits from `Account` and represents an overdraft account, which allows for negative balance.
5. `OverdraftJointAccount`: Inherits from `JointAccount` and represents a joint overdraft account.Additionally, the `IdentifiableEntity` class is used as a base class for entities that require a unique identifier.
### Custom exceptions used in this project are:
1. `InsufficientAmountException`: Thrown when the deposit or withdrawal amount is zero or negative.
2. `InsufficientBalanceException`: Thrown when the withdrawal amount exceeds the account balance.
3. `SsnNotValidException`: Thrown when the social security number provided does not match the account holder's.## Installation and Usage
The project can be run using any Java IDE or from the command line by compiling the java files and running the Main.java file.