Advanced Atm Management System Using C++

Advanced Atm Management System using C++ (With Source Code)

Advanced Atm Management System using C++ (With Source Code)

Hello, coders. Welcome to the codewithrandom blog. In this article, we will learn how to create an Advanced Atm  Management System using C++ (With Source Code).

An ATM management system is a console based application that allows the user to perform various banking transactions. It is a computer program developed to control and monitor the functioning of automated teller machines (ATMs). Account administration, transaction processing and security management are common functions. In this system the user can perform various functions such as deposit cash, withdraw cash, make a balance enquiry, pay bills and pay account interest. This system is easy to use and is created using C++ programming language.

Atm Simulator using C++ (With source Code)

Who can use this system?

Banks and financial organizations can use an Advanced ATM  management system to monitor the operation and health of their ATM network, including cash levels, and transaction volumes. The system may also be used to adjust ATM parameters such as transaction limitations and charge schedules remotely.

Overall, an Advanced ATM  management system may assist banks and financial institutions in streamlining their ATM operations, reducing downtime, and providing a better client experience.

Overview of the UI:

                                                  ATM Main Menu Screen
   Enter [1] To  Deposit Cash
   Enter [2] To Withdraw Cash
   Enter [3] To Balance Inquiry
   Enter [4] To Pay Bills
   Enter [5] to Pay Account Interest
   Enter [0] to Exit ATM
PLEASE ENTER A SELECTION AND PRESS RETURN KEY:
The user will choose an option to perform the operation of their choice. User will then enter a values according to the prompts that will be displayed on the console to perform that operation.

Advanced Atm Management System Source code:

You can directly use this code by copying it in your IDE to understand the working and then can create it by understanding the project.

#include <iostream>
    #include <iomanip>
    #include <time.h>
    #include <fstream>
    #include <conio.h>
    #include <string.h>
    #include <stdlib.h>
    //#include<process.h>
    //#include<dos.h>
    using namespace std;
     
    //==================================================================================================
    class Bank //abstract base class
    {
    public:
        double startBalance;
        string COKAccountHolders;
        double limit;
    //virtual bool Deposit(double Dvalue)=0; // manage deposit
    //virtual bool Transaction(double Dvalue)=0;// use as necessary
    //virtual void Display_accountBalance()=0;// Show the balance in a nice way
    //virtual void SetLimit(double NewLimit)=0;
    //virtual double GetLimit()=0;
      
    };
     
     
    //==================================================================================================
    class ATMAccountHolders:public Bank
        {
        string accountHolders;
        string accountHoldersAddress, branch;
        int accountNumber;
        double startBalance;
        double accountBalance;
        double accountInterest;
        double amount;
        int count;
     
        public:
        //void Display_accountBalance();
        void deposit();
        void withdraw();
        void details();
        void payBills();
        void accountExit();
        void interest();
         
        ATMAccountHolders()
        {
        accountNumber = 5678;
        accountHolders = "Johhy Dre";
        accountHoldersAddress = "Eastway, House no.36";
        startBalance = 60000.00;
        accountBalance = 20000.00;
        branch  = "Pkr";
        amount = 20000;                
        }
        };
    //==================================================================================================   
        void ATMAccountHolders::interest()
         {
        system("cls");
           
            cout<<"\n\xB2\xB2\xB2\xB2\\xB2\xB2\xB2\xB2\ATM ACCOUNT INTEREST PAYMENT\xB2\xB2\xB2\xB2\\xB2\xB2\xB2\xB2\\n\n";
           cout<<"\tThe Interest is calculate over the last SIX months on the average account balance\n";
           cout<<"\n\t\tInterest Rate payable is 10% per annum."<<endl;
           cout<<"\t\tView the accumulated interest? Press 1 for Yes OR 0 for NO.\n\n";
            
            
             
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT INTEREST PAYMENT \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
             
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
            cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
            accountInterest=accountBalance+(accountBalance*1.050);
            cout<<"\tPresent available balance + interest for 6 months :$"<<accountInterest<<"\n\n";
            cout<<"Press any key to Return to the Main Menu\n\n";
            system("PAUSE");
            }
    //==================================================================================================     
        
     
    //==================================================================================================
        void ATMAccountHolders::deposit()
        {
             system("cls");
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT DEPOSIT SYSTEM \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
             
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
            cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
            cout<<"\tEnter the Amount to be Deposited $";
                 
                double amount;
                cin>>amount;
            accountBalance=startBalance+amount ;
            cout<<"\n\tYour new available Balanced Amount is $"<<accountBalance<<endl ;
            cout<<"\n\t\t\tThank You!\n\n"<<endl;
            cout<<"Press any key to Return to the Main Menu\n\n";
            system("PAUSE");
        }
    //==================================================================================================
        void ATMAccountHolders::withdraw()//Withdrawal Transactions
        {
             system("cls");
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WTHDRAWAL \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
             
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
            cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
            cout<<"\tEnter the Amount to be Withdrawn $";
                 
                double amount;
                cin>>amount;
                 
                if(amount>accountBalance||amount>9000)//Limit set at $9000 maximum after paying bills
                {
            system("cls");
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WITHDRAWAL \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\n\tInsufficient Available Balance in your account.\n\n"<<endl;
            cout<<"\t\t\tSorry !!\n"<<endl;
            system("PAUSE");
                }
            else
                {
                    double b;
                    accountBalance=startBalance-amount ;
        system("cls");
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WTHDRAWAL \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
        cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"Your new available Balanced Amount is $"<<accountBalance<<endl ;
            cout<<"Press any key to Return to the Main Menu\n\n";
            system("PAUSE");               
               }
         
        }
    //==================================================================================================
        void ATMAccountHolders::payBills()
        {
            system("cls");
               
     
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM BILLS PAYMENT SYSTEM \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n";
             
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"Pay Electric Company electricity bill of $2000.00 now?\n\n";
            cout<<"\t\tPress 1 for Yes OR Press 0 for No\n\n";
             
            int r;
             
            cin>>r;
            if(r=1)
            {accountBalance=startBalance-2000;
            system("cls");
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM BILLS PAYMENT SYSTEM \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n";
            cout<<"\n\tYour electricity bill of $2000.00 has been paid.\n\n";
            cout<<"\tYour account new Available Balanced Amount is $"<<accountBalance<<endl ;
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"Press any key to Return to the Main Menu\n\n";
           }
           if(r=0)
           {
           cout<<"\n===========================ATM BILLS PAYMENT SYSTEM==========================\n\n";
            cout<<"\n\n\tExiting Bill Payment System. Thank you!.\n\n";    
            cout<<"====================++THANK YOU++============================\n\n";     
           }
            system("PAUSE");   
        };
         
    //==================================================================================================
    void ATMAccountHolders::details()
        {
            system("cls");
               
     
            cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT DETAILS \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
            cout<<"Press any key to Return to the Main Menu\n\n";
            system("PAUSE");   
        }
     
    //==================================================================================================     
     
     void ATMAccountHolders::accountExit()
        {
            system("cls");
               
     
            cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ ATM ACCOUNT EXIT \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
            cout<<"\n\n\t\t BROUGHT TO YOU BY CODE-PROJECTS \n\n";
            cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
            system("PAUSE");
            exit(1);   
        }
         
         
    //==================================================================================================     
    /*class Bills
         {
           
          double JPS;
          double NWC;
          double FLOW;
          double RENT;
          double bills;
          void Display_accountBalance();
          public:
          void jps();
          void nwc();
          void flow();
          void rent();
          
          Bills()
          {
          double JPS = 2000;
          double NWC = 1500;
          double FLOW = 3500;
          double RENT = 14000;
             
            }
          void Bills::jps()
         
            system("cls");
               
     
            cout<<"\n============================ATM BILL PAYMENT SYSTEM=============================\n\n";
            cout<<"\n\nThe Names of the Account Holders are :"<<accountHolders<<"\n\n";
            cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
            cout<<"\tThe Branch location is :"<<branch<<"\n\n";
            cout<<"\tAccount number :"<<accountNumber<<"\n\n";
            cout<<"====================++THANK YOU++============================\n\n";
            cout<<"============================+++++++++++++++++++++++============================\n\n";
            system("PAUSE");   
          }
           
          };*/
    //==================================================================================================
     
    class Limits:public Bank
          {
          public:
                 void SetLimit(double NewLimit)
                 {}
           
                 double Getlimit()
                 {}
           
          };         
    //==================================================================================================
    //==================================================================================================     
    //==================================================================================================     
        int main()
        {
        int e;
        ATMAccountHolders p;
         
        system ("Color 5f");
            cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ WELCOME TO ATM \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
        cout<<"\t\t\t--------------------\n"<<endl;
            //Prompt to show today's date
           cout << "\t\tCurrent date : ";
           //Show date and time function
             time_t now;
             time(&now);
     
            printf("%s\n", ctime(&now));;
          //Give space for the function of date and time
            cout<<"\t\t\t--------------------\n"<<endl;
            cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
    //==================================================================================================     
             
          cout<<"\tPress 1 and Then Press Enter to Access Your Account Via Pin Number\n\n";
          cout<<"\t\t\t\t\t or \n\n";
          cout<<"\tPress 0 and press Enter to get Help.\n\n";
             
          int access;
          cin>>access;
          switch(access)
          {
          case 1://pin to access account
          system("cls");int i, pin;
           
          cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 ATM ACCOUNT ACCESS \xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
          cout<<"\n\nEnter Your Acc Pin Access Number! [Only one attempt is allowed]\n\n"<<endl;
          cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";               
          cin>>pin;
           
          system("cls");
           
          if(pin==12345)
           
          {
          system("cls"); 
           
          do
            {
          system("cls");  
         
    cout << endl << "\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM Main Menu Screen \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n" << endl << endl;
    cout << "\t\tEnter [1] To  Deposit Cash" << endl;
    cout << "\t\tEnter [2] To Withdraw Cash" << endl;
    cout << "\t\tEnter [3] To Balance Inquiry" << endl;
    cout << "\t\tEnter [4] To Pay Bills" << endl;
    cout << "\t\tEnter [5] to Pay Account Interest" << endl;
    cout << "\t\tEnter [0] to Exit ATM" << endl << endl;
    cout << "\tPLEASE ENTER A SELECTION AND PRESS RETURN KEY: \n\n";
    cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
             
            cin>>e;
            switch(e)
            {
                case 1:
                    p.deposit();
                    break;
                case 2:
                    p.withdraw();
                    break;
                case 3:
                    p.details();
                    break;
                case 4:
                    p.payBills();
                    break;
                case 5:
                    p.interest();
                    break;
                case 0:
                    p.accountExit();
                    break;
            default:cout<<"Please Enter the Correct Number Choice"<<endl;
            }
        }while(e!=0);
     
          break;                                    
          }
                    
          else
          {
          system("cls");
         
    cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb THANK YOU \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
    cout<<"\nYou had made your attempt which failed!!! No More attempts allowed!! Sorry!!\n\n";
    cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
                   
          system("PAUSE");
          exit (1);
          }
    //==================================================================================================    
           
           
        case 0://pin to access account
        system("cls");
          cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT STATUS \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
                        cout<<"\tYou must have the correct pin number to access this acount. See your\n\n";
                        cout<<"\t  bank representative for assistance during bank opening hours\n\n";
                        cout<<"\t\tThanks for, your choice today!!\n\n";
          cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
          system ("PAUSE");
          exit(1);      
          break;   
    //==================================================================================================        
        }
         
    system("PAUSE");
    return 0;
     
    };

Now let us understand the code:-

  • We will start by writing the header of the code with the required libraries –
    iostream  (input and output stream), iomanip (formatting), time.h (time management), fstream (file input and output), conio.h (console input/output), string.h (string manipulation), stdlib.h (memory management).
  • Now we will be creating a class called Bank which will have three public member variables with their data-type as follows – double startBalance, string COKAccountHolders, double limit.
  • Creating another class called ATMAccountHolders which will have public data member variables along with their data type as follows – string accountHolders, string accountHoldersAddress, branch, int accountNumber, double startBalance, double accountBalance, double accountInterest, double amount, int count.
  • We will declare public member functions for the ATMAccountHolders class – void deposit(), void withdraw(), void details(), void payBills(), void accountExit(), void interest(). Create a constructor for this class which will hold the accound information.
  • Now we will define the member functions of the class outside the class using the scope resolution operator.
  • The interest() function will calculate the user’s account interest and display the total, it will calculate account balance for the last six months.
  • The deposit() function will allow the user to deposit money into their account. It will display the account information and then ask the user to enter the amount thy want to deposit into their account. Then it will display the new total balance.
  • The withdraw() function will allow the user to withdraw money from their account. The user will enter the money they want to withdraw, then after withdrawing the money it will display the remaining balance in the account.
  • The paybill() function allows the user to pay their electricity bills. After paying it will display the new available balance amount in the account.
  • The details() function will display the account details, including the account holder’s name, address, branch location, account number.
  • The accountExit() function will exit the program.
  • Now the main() function will contain the function calls for the operation the user selects to perform. We have a set a background color using the – system (“Color 5f”). The date and time will be shown using the time function and then the user will be given 2 options – press 1 or 0 to enter the system or get help respectively.
  • After selecting option 1, user will enter pin which is – 12345. You can set your own pin by changing it in source code. The console will display the ATM main menu screen. A switch case is used to select between the options. The user will make a choice and the syatem will call the corresponding function to perform the operation.
  • This sums up our project of Atm Advanced Management System using C++.

Airline Ticketing System using C++ (With Source Code)

Final Output:-

Here is an example to show how this project works.

Advanced Atm Management System

The account access pin is preset which is 12345.

Advanced Atm Management System Using C++

The ATM Main Menu Screen is displayed

Advanced Atm Management System Using C++

Option 1 is selected and the money is deposited.

Advanced Atm Management System Using C++

Selecting option 2 to withdraw money, after withdrawing the total balance is displayed.

Advanced Atm Management System Using C++

Selecting option 5 to pay account interest.

Advanced Atm Management System Using C++

Conclusion

We have reached the end of this article and have a lot more projects in C++ coming so stay tuned. We have started with awesome and fun projects for you all to understand C++. Learning C++ by creating fun projects makes learning easy and interesting.

Creating a Pizza Hut Management system using C++ (With Source Code)

If you enjoyed the article and learned something new today, let us know in the comments.

Thank you.

ADVERTISEMENT

Happy Reading! 🙂

ADVERTISEMENT

Follow: CodewithRandom

ADVERTISEMENT



Leave a Reply