/* CheckingAccount.cpp CIS 250 2013-03-14 David Klick modified by: date: This is the implementation file for the CheckingAccount class for the Bank Account assignment. */ #include "CheckingAccount.h" CheckingAccount::CheckingAccount(const char* accnum, const double bal, const double minbal, const double intrat, const double svcchg) { // implement the constructor } double CheckingAccount::getMinimumBalance() const { return minimumBalance; } double CheckingAccount::getInterestRate() const { return interestRate; } double CheckingAccount::getServiceCharge() const { return serviceCharge; } // implement the three mutator methods void CheckingAccount::setMinimumBalance(const double minbal) { } void CheckingAccount::setInterestRate(const double intrat) { } void CheckingAccount::setServiceCharge(const double svcchg) { } void CheckingAccount::postInterest() { // figure out the interest and add it to the balance } bool CheckingAccount::verifyMinimumBalance(const double amt) const { // return true if the amt requested can be withdrawn // and leave the balance at or above the minimum balance, // otherwise return false } bool CheckingAccount::writeCheck(const double amt) { return withdraw(amt); } bool CheckingAccount::withdraw(const double amt) { // if you can withdraw the amt without going below the // minimum balance, then withdraw it and return true // if the amt to withdraw will take the balance below the // minimum balance, but there will be enough left for // the service charge, then withdraw both the amt and the // service charge and return true // otherwise withdraw nothing and return false } std::ostream& operator<<(std::ostream& strm, const CheckingAccount& ca) { // implement the insertion operator return strm; }