
//*****************************************************************************
////  Course:             COMS 2203 Foundations of Computer Programming II Sect. 2
////  Semester:           Fall 2004
////  Assignment Number:  #7                             
////  Author Name:        DarC KonQuesT                        
////  Date Written:       October 20, 2004
////                                                         
////  Description of Program:                              
////  Implementation file of SavingsAccount.h - Defines constructor and  
////  postInterest function.
////*****************************************************************************
#include "SavingsAccount.h"
#include <iostream>

using namespace std;

SavingsAccount::SavingsAccount(double initialAmount, double newInterestRate) : BankAccount::BankAccount(initialAmount)
{
  interestRate = newInterestRate;
}

void SavingsAccount::postInterest()
{
  BankAccount::deposit(BankAccount::getBalance() * interestRate / 100.0);
}

