
//*****************************************************************************
////  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 CheckingAccount.h - defines constructor and 
////  checking account withdrawel functions.
////*****************************************************************************
#include <iostream>
#include "CheckingAccount.h"

CheckingAccount::CheckingAccount(double initialAmount, double newMinBalance, double newCharge) : BankAccount::BankAccount(initialAmount) 
{
  minBalance = newMinBalance;
  charge = newCharge;
}

void CheckingAccount::withdraw(double amount)
{
  if((getBalance() - amount) < minBalance)
  BankAccount::withdraw(amount + charge);
  else
    BankAccount::withdraw(amount);  
}


