Welcome to the Apna Bank ATM Simulation – menu-driven ATM simulation built using C++. This project serves as an excellent demonstration of fundamental programming concepts in a practical, easy-to-understand application.
This simple yet functional ATM interface allows users to perform essential banking transactions like checking their balance, depositing funds, and withdrawing money, all protected by a secure PIN system.
- Secure PIN Authentication: Access is protected by a 4-digit PIN.
- Balance Inquiry: Instantly check your current account balance.
- Fund Deposits: Add funds to your account with built-in deposit limits.
- Fund Withdrawals: Withdraw money safely, with checks to prevent overdraft.
- Interactive Menu: A clean, menu-driven interface for a smooth user experience.
- Cross-Platform: Written in standard C++, it can be compiled and run on any major operating system.
g++ bank.cpp -o atm
./atmHere is a quick walkthrough of the simulation in action: Welcome to Apna Bank.
Please enter your pin or type 0000 to exit: 1327 PIN is correct. Proceeding to main menu.
Please select one of the following options:
View your current balance.
Deposit funds into your account.
Withdraw funds from your account.
Exit.
2
You may withdraw any amount up to $9999.00.
To go back to the main menu, you may select
Please select one of the following options:
View your current balance.
Deposit funds into your account.
Withdraw funds from your account.
Exit.
3
You may withdraw any amount up to and including your current balance, which is $500.00.
To go back to the main menu, you may select
Please select one of the following options:
View your current balance.
Deposit funds into your account.
Withdraw funds from your account.
Exit.
4 Thank you for banking with us. Goodbye.
- C++: The core programming language.
- Standard Libraries:
<iostream>for handling console input and output.<iomanip>for formatting currency values.
To get a local copy up and running, follow these simple steps.
You need a C++ compiler installed on your machine. The most common is g++, which is part of the GNU Compiler Collection (GCC).
- Windows: Install MinGW or use the C++ workload in Visual Studio.
- macOS: Install Xcode Command Line Tools by running
xcode-select --installin your terminal. - Linux: Install the
build-essentialpackage.sudo apt-get install build-essential
- Clone the repository (replace with your actual repo URL):
git clone https://github.com/sharma-bhupesh/atm-simulation-cpp.git
- Navigate to the project directory:
cd atm-simulation-cpp - Compile the code (assuming the file is named
bank.cpp):g++ bank.cpp -o atm
- Run the application:
(On Windows, you may need to run
./atm
atm.exe)
Upon launching the application, you will be prompted to enter your PIN.
- The default PIN is hardcoded as
1327. - Enter
0000to exit the program at the PIN prompt.
Once authenticated, use the on-screen menu by entering the number corresponding to your desired action.
This is a simple project, but future enhancements could include:
- Multiple User Accounts: Allow switching between different users.
- Data Persistence: Save account balances to a file so data isn't lost on exit.
- Object-Oriented Design: Refactor the code into
AccountandATMclasses. - Enhanced Error Handling: Gracefully handle non-numeric inputs.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Thank you for banking with us. Goodbye.