//******************************************************************* // // Project: ChequeBook (Lab 6) // // Class: Account // // Author: CS 1711 // // Description: an account // // Date: 1999 Fall // // Filename: account.h // //******************************************************************* #ifndef ACCOUNT //preprocessor directive #define ACCOUNT #include "transaction.h" class Account{ private: double balance; // the current balance int month, day; // the date public: // constructor Account(double initBalance, int thisMonth, int today); //access function prototypes double getBalance(); int getMonth(); int getDay(); // function prototype void update(Transaction thisTrans); }; // *********************************************************** // Account class implementation // *********************************************************** // implementation of the constructor // with three parameters Account::Account(double initBalance, int thisMonth, int today) { // COMPLETE THIS!! } // access implementation double Account::getBalance() { return balance; } int Account::getMonth() { return month; } int Account::getDay() { return day; } // function implementation void Account::update(Transaction thisTrans) { // GET THE DAY USING ACCESS FUNCTION FOR thisTrans // UPDATE balance DEPENDING ON THE TYPE OF thisTrans } #endif