//******************************************************************* // // Project: ChequeBook (Lab 6) // // Class: Transaction // // Author: CS 1711 // // Description: a transaction on an account // // Date: 1999 Fall // // Filename: transaction.h // //******************************************************************* #ifndef TRANSACTION //preprocessor directive #define TRANSACTION #include class Transaction{ private: char transType; int day; // the date double amount; // the size public: // constructor Transaction(); //access function prototypes char getType(); int getDay(); double getAmount(); // function gets transaction from a file stream void get(ifstream& transtr); }; // *********************************************************** // Account class implementation // *********************************************************** // implementation of the default constructor Transaction::Transaction() { transType = 'U'; day = 0; amount = 0; } // access implementation // WRITE ACCESS FUNCTIONS FOR EACH DATA MEMBER // function implementation void Transaction::get(ifstream& transtr) { // GET THE DATA FROM THE FILE (THIS REQUIRES ONE LINE) } #endif