// ENGR 131, Monday 3:30 Recitation (Amanda Rohn)
// HW 10 - Checking Account class
// (Solution)

// File: checking.h
// Contains declaration of classes Checking and Transaction

#include <vector>
using std::vector;

#ifndef CHECKING_H
#define CHECKING_H

class Transaction
{
public:
	// CONSTRUCTORS
	Transaction(double money);
	// DESTRUCTOR
	~Transaction();
	// INQUIRY FUNCTIONS
	double getAmount();
	char getType();
private:
	Transaction();	//private so it can't be used
	char type;	// 'W' or 'D' for withdrawal or deposit
	double amount;
};

class Checking
{
public:
	// CONSTRUCTORS
	Checking();
	Checking(double initmoney);
	// DESTRUCTOR
	~Checking();
	// INQUIRY FUNCTIONS
	double getBalance();
	Transaction getTrans(int num);
	// MODIFICATION FUNCTIONS
	void Deposit(double money);
	void Withdraw(double money);
private:
	double balance;
	vector<Transaction> history;
};


#endif