/*
    Name: Program for Alibaba bank account, aiming to build a simple bank system using class and objects, but with multiple users input.
    Author: muguangde
    Date:09/22/2014-09:21AM
    Description: This is a small program to simulate bank
    account management. User create an account first, then
    perform other operations.
*/

#include "Tracsaction.h"

/* Mutator Function for Transaction Class */
void Transaction::setTrans(int t, double a)
{
    ttype =t;
    amt = a;
}

/* Print Transactions Corresponding to Transaction Type (ttype) */
void Transaction::prt()
{
    string message;
    if (ttype == 0)
        message = "Account Opened.";
    else

        if (ttype == 1)
            message = "Deposit.";
        else

            if (ttype == 2)
                message = "Withdrawal.";
            else

                if (ttype == 3)
                    message = "Account Closed.";
    cout << message << " " << amt << endl;
}




  
回到主页 回到目录