Skip to content

PSP25/Banking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Here’s a GitHub repository README.md file for your Banking System Console Application:

Banking System Console Application

A feature-rich C++ console-based banking application to manage bank accounts, handle deposits and withdrawals, perform balance inquiries, and store account data persistently using file handling.

Project Overview

This project is a simple banking system built using C++ with an object-oriented approach. It demonstrates the core functionality of a banking system with file handling for persistent storage and showcases key concepts like OOP, data structures, exception handling, and operator overloading.

Features

  • Account Creation: Users can open new accounts by providing their first name, last name, and initial balance.
  • Balance Inquiry: Users can check the balance of their accounts by entering the account number.
  • Deposit & Withdrawal: Users can deposit or withdraw money from their accounts. Withdrawal is only allowed if there are sufficient funds.
  • Account Closure: Users can close their accounts and remove all associated data.
  • Persistent Storage: All account details are stored in a file and retrieved upon running the program.

Tech Stack & Concepts Used

  • C++ Programming: Core language for development.
  • Object-Oriented Programming (OOP): Classes (Account, Bank), inheritance, encapsulation, and polymorphism.
  • File Handling: Persistent data storage using file input/output (I/O) operations.
  • Exception Handling: Managed errors like insufficient funds during withdrawals.
  • Data Structures: Utilized map for efficient account storage and management.
  • Operator Overloading: Simplified file I/O and display of account details.

System Design

  • Classes:

    • Account: Represents an individual bank account, storing details such as account number, name, and balance.
    • Bank: Manages all accounts and provides the main functionalities (open, close, deposit, withdraw, balance enquiry).
  • Persistent Data Management: Account data is stored in a file (Bank.data) and is retrieved every time the application starts, ensuring that accounts are retained between sessions.

How to Run the Project

  1. Clone the repository:
    git clone https://github.com/PSP25/Banking-System.git
    
  2. Compile the project using a C++ compiler:
     g++ banking_system.cpp -o banking_system
    
    
  3. Run the executable:
     
     ./banking_system
    
    
  4. Follow the on-screen instructions to use the banking system.

Sample Commands

Here are some example commands that you can use once the system is running:

•	Open a new account
•	Check your account balance
•	Deposit or withdraw money
•	Close an account
•	View all accounts

Future Enhancements

•	Adding a Graphical User Interface (GUI) for better user interaction.
•	Replacing file handling with a database (e.g., MySQL) for larger-scale systems.
•	Adding authentication features (e.g., passwords for accounts).
•	Implementing loan management and interest calculation.

Code Snippet

Here’s a snippet showing how file I/O is handled for account persistence:

ofstream & operator<<(ofstream &ofs, Account &acc) {
    ofs << acc.accountNumber << endl;
    ofs << acc.firstName << endl;
    ofs << acc.lastName << endl;
    ofs << acc.balance << endl;
    return ofs;
}

ifstream & operator>>(ifstream &ifs, Account &acc) {
    ifs >> acc.accountNumber;
    ifs >> acc.firstName;
    ifs >> acc.lastName;
    ifs >> acc.balance;
    return ifs;
}

Contact

If you have any questions or feedback, feel free to reach out:

•	Email: priyanshupanda2019@gmail.com
•	LinkedIn: https://www.linkedin.com/in/priyanshusp/

About

A project to show C++ and OOPS skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages