Skip to content

Cata1022/Banking-System-using-OOP-principles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banking System using OOP principles

About the Project

This project is meant to implement a simplified banking system using Java, designed to simulate core banking functionalities. My goal with the project was to build an intuitive, secure, and modular application while exploring Object-Oriented Programming (OOP) concepts in Java. The architecture is designed to be easily extensible for future complex features.

Core Functionalities

1. User Management

The system initializes by loading users from an input file. Each user is defined by basic data:

  • firstName: The user's given name.
  • lastName: The user's family name.
  • email: The user's contact email.

2. Currency Exchange

A modern banking system must handle multiple currencies. Instead of relying on a live API (like the National Bank), exchange rates are provided dynamically within the input files whenever a conversion is required. The conversion data includes:

  • from: The source currency.
  • to: The target currency.
  • rate: The conversion multiplier.

3. Transaction Monitoring

To ensure security and prevent fraud, every action performed on an account is tracked. The system monitors both successful operations and errors. Tracked transactions include:

  • Account creation
  • Card creation and deletion
  • Online payments
  • Interest collection and rate modifications (for savings accounts)
  • Minimum balance setup
  • Standard bank transfers
  • Split payments

4. Account Management

Users can create two types of accounts: classic and savings.

  • When an account is created, a unique IBAN is generated using a utility class, and the initial balance is strictly set to 0.
  • For savings accounts, an interestRate must be provided.
  • Users can also add funds to their accounts or delete an account (only if the balance is exactly 0 and all associated cards are destroyed).

5. Card Management

The system supports two types of cards linked to a user's account:

  • Standard Card: Can be used for multiple transactions.
  • One-Time Pay Card: A temporary card that is automatically destroyed and regenerated after a single transaction.
  • Cards can be deleted manually, rendering them unusable.

6. Balance & Security Controls

  • Minimum Balance: Users can define a minimum balance limit for their accounts to prevent overspending. If a transaction pushes the balance below this limit, the payment is rejected, and the card's status is updated to frozen. A warning status is triggered if the balance drops within 30 units of the minimum limit.
  • Card Status Verification: A dedicated command checks if a card is frozen or active before allowing online payments.

7. Payments & Transfers

  • Online Payments: Users can pay merchants using their cards. The system verifies if the user owns the card and has sufficient funds.
  • Bank Transfers: Users can send money to other accounts (even their own). The system automatically handles currency conversion between the sender and receiver accounts.
  • Aliases: To simplify transfers, users can assign a custom name (alias) to a specific IBAN and use that alias for future transactions.
  • Split Payments: The system allows splitting a bill equally among multiple accounts. If even one account lacks sufficient funds, the entire split payment fails, and an error is logged for all participants.

8. Savings & Interest

  • Interest Collection: Users with savings accounts can periodically collect interest based on their current balance.
  • Interest Rate Changes: The bank can adjust the interest rate, generating a specific transaction log for the affected accounts.

9. Reporting

To provide financial insights, the system can generate JSON-formatted reports for a specified time interval:

  • Classic Report: Displays the account's IBAN, current balance, currency, and a list of all transactions within the interval. For savings accounts, this only includes interest-related transactions.
  • Spending Report: Analyzes card payments and groups them by merchants (sorted alphabetically). This allows users to see exactly how much they spent at specific vendors over a given period.

About

Modular banking simulation in Java, applying advanced OOP principles to ensure scalable software architecture

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors