Here is the class definition that I have so far:
#ifndef SAVINGACCOUNT_H
#define SAVINGACCOUNT_H
#include<iostream>
#include<string>
class SavingAccount
{
public:
/** Default constructor */
SavingAccount();
/** Default destructor */
~SavingAccount();
string getfirstName() const;
string getlastName() const;
static double modifyInterestRate();//static method declaration
static double calculateMonthlyInterst(double,double);
void setannualInterestRate(double);
double getannualInterestRate() const;
private:
string firstName;
string lastName;
double savingsBalance;
static double annualInterestRate;
};
#endif // SAVINGACCOUNT_H
and the implementation code:
#include<iostream>
#include<string>
#include "SavingAccount.h"
SavingAccount::SavingAccount()
{
//ctor
}
string setfirstName()
{
getline(cin,firstName);
}
string setlastName()
{
cin>>SavingAccount::getlastName;
}
int InterestRate();
double modifyInterestRate()
{
}
double caclulateMonthlyInterest(double savingsBalance, double annualInterestRate)
{
savingsBalance=+(annualInterestRate/12);
return savingsBalance;
}
SavingAccount::~SavingAccount()
{
//dtor
}
void setannualInterestRate()
{
SavingAccount::annualInterestRate=0.03;
}
double getannualInterestRate()
{
cin>>SavingAccount::annualInterestRate;
}
Can anyone help me with this here.
It gives a whole bunch of errors.