/* Name: savings.cpp * Purpose: Implementation File for Bank Savings Account Class * Author: Dr. Michael A. Redmond * Date Written: 05/04/98 * Date Revised: * NOTES: */ // in savings.cpp #include "account.h" #include "savings.h" Savings::Savings() : Account(), IntYTD(0) { } // bal defaults to 0.0 // interestToDate defaults to 0.0 Savings::Savings(const string& numb, double bal, double interestToDate) : Account(numb,bal), IntYTD(interestToDate) { } double Savings::ProcessMonthEnd() { double interest = GetBal() * (IntPct / 12); Deposit(interest); IntYTD = IntYTD + interest; return GetBal(); } double Savings::GetIntYTD() { return IntYTD; }