interestcalculator/Project2/Interest.h
2023-04-11 18:40:15 -07:00

34 lines
692 B
C++

/*
* Cody Cook
* Project 2
* SNHU
* 2023/04/02
*/
#ifndef INTEREST_H
#define INTEREST_H
class Interest
{
public:
Interest();
Interest(double t_initial = 0, double t_monthly = 0, double t_rate = 0, unsigned int t_years = 0);
// getters
double getInitial() const;
double getRate() const;
unsigned int getYears() const;
double getMonthly() const;
// setters
void setInitial(double t_initial);
void setRate(double t_rate);
void setYears(unsigned int t_years);
void setMonthly(double t_monthly);
// methods
void calculateBalance(bool t_monthlyDeposit);
private:
double m_initial;
double m_rate;
unsigned int m_years;
double m_monthly;
};
#endif