This project is a robust Bank Management System implemented in C++. It utilizes Object-Oriented Programming (OOP) principles to provide a secure and structured environment for managing bank clients, users, and financial transactions. The system includes advanced features such as user access control, data persistence, and a dedicated currency exchange service.
The primary goal of this system is to offer a comprehensive solution for bank operations, including client account management (deposit, withdrawal, transfer), user administration, and detailed logging of system activities.
The system is designed with a rich set of functionalities to cover essential banking and administrative tasks:
| Feature Category | Features | Description |
|---|---|---|
| Client Management | Client List, Add New Client, Update Client, Delete Client, Find Client | Full CRUD (Create, Read, Update, Delete) operations for managing bank client records. |
| Transactions | Deposit, Withdraw, Transfer, Total Balance | Core financial operations, including inter-account transfers and calculation of the total bank balance. |
| User Administration | User List, Add New User, Update User, Delete User, Find User | Full CRUD operations for managing system users with different access levels. |
| Security & Logging | Secure Login, Access Permissions, Login Register, Transfer Log | Implements a robust security model with encrypted passwords, granular permissions, and detailed logging of all login attempts and financial transfers. |
| Currency Exchange | Currencies List, Find Currency, Update Rate, Currency Calculator | A dedicated module for managing currency exchange rates and performing conversions between different currencies. |
The project is built upon a strong OOP foundation, leveraging key principles to ensure code reusability, maintainability, and logical separation of concerns.
The system employs a clear inheritance hierarchy, starting with a base class for common attributes:
| Base Class | Derived Classes | Description |
|---|---|---|
clsPerson |
clsBankClient, clsUser |
clsPerson serves as the base class, encapsulating common personal details (FirstName, LastName, Email, Phone). Both clsBankClient and clsUser inherit these properties, promoting code reuse. |
All class data members are declared as private (e.g., _FirstName, _Password, _AccountBalance). Access and modification are strictly controlled through public methods (SetFirstName(), GetFirstName()) and C++ property wrappers (__declspec(property)) where applicable, ensuring data integrity.
The system uses abstraction to hide complex file handling and data conversion logic from the main application flow.
- Data Persistence: Private static methods like
_LoadUsersDataFromFile()and_ConvertLineToUserObject()handle the intricate details of reading from and writing to text files (Users.txt,Clients.txt, etc.). - Business Logic: Public methods like
Save(),Delete(),Deposit(), andTransfer()provide a simple, clean interface for the user and client management screens, abstracting away the underlying file I/O and data validation.
User access is managed through a comprehensive permissions system, ensuring that only authorized users can perform specific actions.
- Permission Enumeration: An
enum enPermissionsinclsUserdefines distinct access rights using bitwise flags (e.g.,pShowClientsList = 1,pAddNewClient = 2,pManageUsers = 64). - Bitwise Permissions: Each user is assigned a single integer value (
_Permission) which is a sum of their allowed permissions. TheCheckAccessPermission()method uses bitwise AND (&) to efficiently verify if a user has a specific right. - Administrator Access: The
eAllpermission (-1or all bits set) grants full administrative control.
The system maintains data integrity and audit trails by persisting all critical information to dedicated text files.
| Log File | Purpose | Key Data Points |
|---|---|---|
Users.txt |
Stores all system user accounts. | Encrypted Password, Permission Level. |
Clients.txt |
Stores all bank client accounts. | Account Number, PIN Code, Account Balance. |
LoginRegister.txt |
Login Persistence | Logs every successful login attempt with Date and Time, Username, and Permission Level. |
TransferLog.txt |
Transaction Logging | Records every money transfer with Date and Time, Source/Destination Account Numbers, Transfer Amount, and the Responsible User's Name. |
A dedicated clsCurrency class manages currency data and facilitates exchange operations.
- Currency Management: Allows listing, finding, and updating the exchange rate for any currency.
- Conversion Logic: The class provides methods to convert any amount to USD (
ExchangeToUSD()) and then from USD to any other currency (ExchangeToOtherCurrency()), ensuring a standardized conversion pipeline.
The system provides robust methods for managing both system users and bank clients:
- Add/Update/Delete Client: Handled by the
clsBankClientclass, using internal file manipulation methods (_AddNew(),_Update(),Delete()) to ensure data consistency. - Add/Update/Delete User: Handled by the
clsUserclass, with similar internal file management logic. Passwords are encrypted before being stored inUsers.txtusingclsUtil::TextEncryption().
The project is organized into logical directories for clarity and maintainability:
.
├── Core/
│ ├── clsBankClient.h
│ ├── clsCurrency.h
│ ├── clsPerson.h
│ └── clsUser.h
├── Lib/
│ ├── clsDate.h
│ ├── clsInputValidate.h
│ ├── clsString.h
│ └── clsUtil.h
├── Screens/
│ ├── Client/
│ ├── Currencies/
│ ├── User/
│ ├── clsMainScreen.h
│ └── clsScreen.h
├── txt files/ (Data Files)
│ ├── Clients.txt
│ ├── Currencies.txt
│ ├── LoginRegister.txt
│ ├── TransferLog.txt
│ └── Users.txt
└── RunProject.cpp (Main execution file)
- Language: C++
- Data Storage: Flat File System (Text Files)