Name your source code as cpp replace the text with with your
Solution
 LakshmnaRao.CPP :
#include<iostream.h>
 #include<conio.h>
 enum Enum{Credit,Debit};
 class Transaction
 {
    public:
    int ID;
    Enum type;
    float Amount;
};
 class Account
 {
    public:
    int ID;
    char Name[20];
    char DateOpened[20];
    Transaction Transactions[5];
 };
 class Customer
 {
    public:
   int ID;
    char Name[20];
    char Address[40];
    Account Accounts[2];
    int p,i,j;
    Customer(){
        p = 0;
    }
    float getBalance(int accountID){
        Account ac;
        for(j=0;j<2;j++)
        if(accountID==Accounts[j].ID){
            ac = Accounts[j];
        }
        float balance = 0;
        for(i=0;i<5;i++)
            balance += ac.Transactions[i].Amount;
        return balance;
    }
    float getTotalAmount(){
        float total_fund = 0;
        for(i=0;i<2;i++){
            for(j=0;j<5;j++)
                total_fund += Accounts[i].Transactions[j].Amount;
        }
        return total_fund;
    }
    void addMoney(int accountID,int amount){
        Account ac;
        for(i=0;i<2;j++)
        if(accountID==Accounts[i].ID){
            ac = Accounts[i];
        }
        ac.Transactions[p].type = Credit;
        ac.Transactions[p].Amount = amount;
        double total = 0;
        for(j=0;j<5;j++)
                total += ac.Transactions[j].Amount;
        total = total + amount;
        p++;
    }
    void removeMoney(int accountID,int amount){
        Account ac;
        for(j=0;j<2;j++)
        if(accountID==Accounts[j].ID){
            ac = Accounts[j];
        }
        ac.Transactions[p].type = Debit;
        ac.Transactions[p].Amount = amount;
        double total = 0;
        for(j=0;j<5;j++)
                total += ac.Transactions[j].Amount;
        total = total - amount;
        p++;
    }
 };
 void main(){
    clrscr();
    Customer cust;
    int CID = 23858;
    cout<<\"Account ID: \"<<CID<<\"Balance:\"<<cust.getBalance(CID)<<endl;
     cust.addMoney(CID,10);
    int SID = 23575;
    cust.addMoney(SID,10);
    cust.removeMoney(CID,50);
    cout<<\"Total Balance:\"<<cust.getTotalAmount()<<endl;
    getch();
 }


