Skip to content

awrya-cmd/Mini-Financial-Ledger-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini Financial Ledger System

This project is a simple financial ledger written in C++. It simulates how basic banking systems manage accounts and record transactions.

The goal of this project was to understand how financial systems track deposits, withdrawals, and transfers while keeping a transaction history for each account.


Features

  • Create new accounts
  • Deposit and withdraw funds
  • Transfer money between accounts
  • View account balance
  • Maintain transaction history
  • Flag unusually large transactions
  • O(1) account lookup using unordered_map

Accounts are stored using unordered_map so that account lookup operations like deposits or withdrawals can be performed in constant time.


Technologies

-C++
-STL (unordered_map, vector)
-Object-Oriented Programming


System Design

The system is divided into three main components:

  • BankSystem → handles account management and user operations
  • BankAccount → stores account balance and transaction history
  • Transaction → represents individual operations such as deposits or withdrawals

Architecture

User Input
    │
    ▼
BankSystem
    │
    ├── BankAccount
    │       │
    │       └── vector<Transaction>
    │
    └── Transaction

Each account maintains a vector of transactions so that operations can be recorded in the order they occur.


Data Structures Used

unordered_map<int, BankAccount>

Used to store accounts and allow fast lookup.

vector<Transaction>

Used to maintain transaction history for each account.


What I Learned

  • Modeling real-world systems using object-oriented design
  • Using STL containers to manage data efficiently
  • Designing modular C++ programs

Run

Compile:

g++ main.cpp -o ledger

Run:

./ledger

About

C++ financial ledger simulator implementing account management, transaction history, and O(1) lookup using STL data structures.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages