/* Account.cc * This file contains the methods for class Account defined in Account.h * The "Account::" prefix indicates which class these methods belong to * This also illustrates a different form of initialization used in the ctor. */ #include "Account.h" #include // instead of void Account:: deposit (long amount) { balance += amount; } void Account:: withdraw (long amount) { balance -= amount; } void Account:: status () { std::cout << "balance : " << balance << std::endl; } // the following is called a "constructor" - used to initialize new accts Account::Account (long initialAmount): balance (initialAmount) {}// new acct // note default initial amount specified in header file // the following is a "destructor" Account::~Account () { std::cout << "Transfer " << balance << " to manager " << std::endl; }