1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
/*
* Transaction.h
* ATMSim
*
* Created by Philip on 10/26/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
//#define FastCashDrop 20.00
#ifndef _TRANS
#define _TRANS
//#include "ATM.h"
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
#include "Account.h"
using namespace AccMgmt;
#include "ATMcomp.h"
using namespace PARTS;
namespace Trans
{
class Transaction {
public:
Transaction(int chosen_type, BankAccount *account, Keypad KP, Dispenser DROP, EnvelopeWindow WINDOW, Printer PRNT, ostream& fout );
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
int getType() { return type;}
private:
BankAccount *acc;
float amount;
int type;
void Inquiry( Keypad KP, Printer PRNT, ostream& fout );
void Withdrawal( Keypad KP, Dispenser DROP, Printer PRNT, ostream& fout );
void FastCash( Keypad KP, Dispenser DROP, Printer PRNT, ostream& fout );
void Deposit( Keypad KP, EnvelopeWindow WINDOW, Printer PRNT, ostream& fout );
void FastCashSet( Keypad KP, Printer PRNT, ostream& fout );
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
/*
class Inquiry: public Transaction {
public:
Inquiry();
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
private:
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
class Withdrawal: public Transaction {
public:
Withdrawal();
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
private:
void dispense(float Amount);
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
class FastCash: public Transaction {
public:
FastCash();
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
private:
float dispense(float Amount);
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
class Deposit: public Transaction {
public:
Deposit();
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
private:
string DepositType;
float getEnvelope();
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
class FastCashSet {
public:
FastCashSet();
void Extract( ifstream& fin ) throw(AppError); //Boundary mutator
void Insert ( ostream& fout ); //Boundary output
private:
void Get( ifstream& fin ) throw(AppError);
void Put( ostream& fout );
};
*/
}
#endif
|