compe223-090302011-HW1 - #include <iostream> using...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
using namespace std; // CLASS------------------------------- class customer{ private: string custName; double totalPayment; double interestRate,monthlyPayment,totalBorrow; int durationMonth; public: p // Set Value------------------------ void setCustName(string setName){ custName = setName; } void setInterestRate(double setRate){ if (setRate < 0){ cout<<endl; cout<<"***************Interest Rate must be greater than -1"; do{ cout<<endl; cout<<"Enter Interest Rate: "; cin>>setRate; cout<<endl; }while(setRate < 0); } else interestRate = setRate; } void setDurationMonth(int setMonth){ if (setMonth < 0 || setMonth > 12){ cout<<endl; cout<<"***************Duration Month must be between 1 to 12"; do{ cout<<endl; cout <<"Enter the Duration in months: "; cin>>setMonth; cout<<endl; }while(setMonth < 0 || setMonth > 12); } else durationMonth = setMonth; } void setTotalBorrow(double setBorrow){ totalBorrow = setBorrow; } customer(double borrow, double rate, int month):totalPayment(0.0),monthlyPayment(0.00){
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

compe223-090302011-HW1 - #include &lt;iostream&gt; using...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online