This project simulates a banking system where customers can open accounts, deposit, withdraw, and transfer money. The system also implements exception handling for invalid transactions, logging, and various data structures to ensure efficiency. The implementation covers every major topic from the LearnCpp tutorial, making it an excellent educational resource for mastering C++. Additionally, the project includes advanced algorithm and data structure workloads and has been successfully Dockerized with Kubernetes for container orchestration.
- Customer Management: Create and manage customers with multiple accounts.
- Account Management: Open, close, and manage accounts with unique IDs.
- Transactions: Supports deposits, withdrawals, and transfers between accounts.
- Exception Handling: Handles errors such as insufficient funds, invalid account IDs, and negative transactions.
- Data Persistence: Uses file I/O to save and load bank data.
- Multithreading: Simulates concurrent transactions.
- Smart Pointers: Ensures proper memory management.
- Templates & STL: Uses vectors, maps, and other STL containers for efficiency.
- Object-Oriented Design: Implements classes for
Bank,Customer,Account, andTransaction. - Advanced Algorithms and Data Structures: Includes workloads for sorting, searching, and optimizing transaction processing.
- Dockerized with Kubernetes: The application is containerized using Docker and orchestrated with Kubernetes for scalability and deployment flexibility.
This project is designed to cover all major C++ concepts taught in LearnCpp:
Covers fundamental C++ concepts, setting up the development environment, configuring compilers, and compiling code. These fundamentals are used to set up the banking app project and ensure compatibility across different platforms.
Covers the basics of program structure, variables, input/output, and expressions. These concepts are used in the banking app to handle user interactions, such as account creation and balance inquiries.
Functions help modularize the banking app, improving maintainability. They are used to implement deposit, withdrawal, and balance-check functionalities. Header files organize the project efficiently.
Debugging techniques assist in resolving issues in transaction processing and error handling.
Understanding data types helps in defining account numbers (integers), balances (floating point), and user authentication flags (booleans).
Constants ensure fixed transaction limits, and strings handle customer names and account details.
Arithmetic operators are used in calculations like interest and transaction fees. Logical operators validate user inputs and authentication.
Defines variable scopes to manage global settings (interest rates) and local variables (session data).
If statements handle authentication, loops process transaction logs, and switch statements manage menu selections.
Validates user input, prevents overdrafts, and ensures secure authentication mechanisms.
Used to handle currency conversion and flexible numeric computations.
Function overloading optimizes transaction processing for different account types.
Used in memory management and handling account references efficiently.
Enums categorize transaction types, and structs store account details.
Encapsulates account details, user profiles, and transaction history within structured classes.
std::vector manages transaction records; std::array is used for static storage of bank branches.
Sorting algorithms organize transaction history, and iterators traverse account records.
Manages dynamic user session data and memory-efficient transaction logs.
Lambda functions streamline filtering operations (e.g., retrieving recent transactions).
Overloaded operators compare account balances and format output statements.
Smart pointers manage dynamic memory for user sessions and avoid memory leaks.
Composition models customer-bank relationships, while dependencies handle linked accounts.
Base classes represent general bank accounts, while derived classes specialize savings and checking accounts.
Templates provide generic account operations, improving code reusability.
Exception handling ensures robust transaction processing and prevents application crashes.
File I/O stores user data, transaction logs, and configurations securely.
By applying these C++ concepts, our banking app is modular, efficient, and secure, ensuring a seamless user experience.
- C++14 or newer
- g++ or MSVC compiler
- Docker (for containerization)
- Kubernetes (for orchestration)
To build the project locally:(EXAMPLE)
make NUM_TRANSACTIONS=5000 NUM_CUSTOMERS=500 TEST_MODE=0 NDEBUG=0 CONCURRENCY=0
./BankSimulationHere's a clear Building and Running in Docker section for your README.md, covering both individual service builds and the complete compose.yaml setup:
Build and run just the C++ bank service:
# Build the image
docker build `
>> --build-arg NUM_CUSTOMERS=100 `
>> --build-arg NUM_TRANSACTIONS=1000 `
>> --build-arg NDEBUG=0 `
>> --build-arg TEST_MODE=0 `
>> --build-arg CONCURRENCY=0 `
>> -t bank-service .
# Run the container (mounts ./records to /app/records)
docker run -v ${PWD}/records:/app/records bank-servicedocker build `
>> --build-arg NUM_CUSTOMERS=100 `
>> --build-arg NUM_TRANSACTIONS=1000 `
>> --build-arg NDEBUG=0 `
>> --build-arg CONCURRENCY=0 `
>> --build-arg TEST_MODE=0 `
>> -t bank-service .For running both the bank service and file monitor together:
# Build and start all services
docker compose --env-file bank.env build
# Cleanup and remove containers
docker-compose run cleanup
docker compose down
# Rebuild specific service
docker compose build bank-service-Implement a GUI using Qt or SFML. -Connect to an actual database. -Add more complex financial instruments. -Enhance Kubernetes deployment with auto-scaling and load balancing.