Skip to content

Instantly share code, notes, and snippets.

@Jules-Baratoux
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jules-Baratoux/e4308474991b14b5a8b1 to your computer and use it in GitHub Desktop.
Save Jules-Baratoux/e4308474991b14b5a8b1 to your computer and use it in GitHub Desktop.
Homework #4 – Minimizing Compile-time Dependencies
// CheckingAccount.h
#pragma once
#ifndef CHECKINGACCOUNT_H
#define CHECKINGACCOUNT_H
#include <iosfwd>
using std::ostream;
#include <list>
using std::list;
#include <string>
using std::string;
#include <vector>
using std::vector;
#include "BankAccount.h"
class Check;
class CheckingAccount : public BankAccount
{
public:
CheckingAccount(long, double, const string&, const string&);
~CheckingAccount();
double getBalance() const;
void depositCheck(const Check &);
void depositCash(double);
void withdrawCash(double);
virtual ostream& print(ostream &) const;
protected:
void processAccount();
private:
long accountNumber_;
double balance_;
string firstName_;
string lastName_;
vector<double> deposits_;
vector<double> withdrawals_;
list<Check> checks_;
};
ostream &operator<<(ostream &, const CheckingAccount &);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment