MyBankingSystem is a simple C++ project that simulates a basic banking system. It demonstrates the use of CMake for building and organizing the project, as well as C++ features like namespaces, header files, and modularity.
The project is structured as follows:
MyBankingSystem
│
├───include
│ ├───Account.h
│ ├───Transaction.h
│ └───MyBank.h
│
├───src
│ ├───Account.cpp
│ ├───Transaction.cpp
│ └───main.cpp
│
├───CMakeLists.txt
└───README.md
include
: This directory contains header files for theAccount
andTransaction
classes, as well as a common header fileMyBank.h
to include all the headers.src
: This directory contains the implementation files for the classes and the main program.CMakeLists.txt
: This is the CMake configuration file for generating build scripts.
To build the project, follow these steps:
- Make sure you have CMake installed on your system.
- Open a terminal or command prompt.
- Navigate to the root directory of the project (
MyBankingSystem
). - Create a new directory called
build
:mkdir build
- Change into the
build
directory:cd build
- Generate the build files with CMake:
cmake ..
- Build the project using the generated build system:
- On Unix-like systems (e.g., Linux, macOS):
make
- On Windows using Visual Studio: Open the generated solution file (
MyBankingSystem.sln
) and build the project from the IDE.
- On Unix-like systems (e.g., Linux, macOS):
After a successful build, you should find the executable MyBankingSystem
in the build
directory. Run it from the command line to execute the banking system simulation.
The program simulates a simple banking system where you can create accounts, perform deposits, and withdrawals. It also shows basic transaction details.
The current version of the project is a simple demonstration of CMake, namespaces, and header files. To expand the project further, you can consider adding the following features:
- Error Handling: Implement robust error handling for user input and transaction operations.
- Database Integration: Integrate a simple database (e.g., SQLite) to store account information persistently.
- Additional Banking Features: Add more banking features such as balance inquiries, account statements, etc.
- Graphical User Interface (GUI): Create a graphical user interface using a library like Qt for a more user-friendly experience.
- Unit Tests: Write unit tests using a framework like Google Test to ensure code correctness.