/////// File: Account.C /////// #include #include #include "Account.H" Account::Account (unsigned id, double amt, char* s) : _acct_no (id), _acct_bal (amt) { strncpy (_ssn, s, SS_LEN); } double Account::GetBalance() const { return (_acct_bal); } void Account::Deposit (double amt) { _acct_bal += amt; } int Account::Withdraw (double amt) { if (amt > _acct_bal) { return (-1); // failure } _acct_bal -= amt; return (0); } void Account::Display (ostream& out) const { out << "Account No: " << _acct_no << "\n" << "Owner SS: " << _ssn << "\n" << "Balance: " << _acct_bal << endl; }