/* Modular Example */ /* transaction.cpp */ /* OOP244 */ /* Jan 14 2009 */ #include using namespace std; #include "transaction.h" // prompts for and accepts transaction data // void enter(int* acct, char* type, double* amount) { cout << "Enter the account number : "; cin >> *acct; cout << "Enter the account type (d debit, c credit) : "; cin >> *type; cout << "Enter the account amount : "; cin >> *amount; } // displays transaction data // void display(int acct, char type, double amount) { cout << "Account " << acct; cout << (type == 'd' ? " Debit $" : " Credit $") << amount; cout << endl; }