loan.h 770 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __LOAN__
  2. #define __LOAN__
  3. using namespace std;
  4. class loan{
  5. public:
  6. loan(string description, float money, int months, float installment):
  7. _description(description), _money(money), _months(months),
  8. _installment(installment){}
  9. void set_description(string description){ _description = description; }
  10. void set_money(float money){ _money = money; }
  11. void set_months(int months){ _months = months; }
  12. void set_installment(float installment){ _installment = installment; }
  13. string get_description(){ return _description; }
  14. float get_money(){ return _money; }
  15. int get_months(){ return _months; }
  16. float get_installment(){ return _installment; }
  17. private:
  18. string _description;
  19. float _money;
  20. int _months;
  21. float _installment;
  22. };
  23. #endif