Ane bn me program eka karala diyankoo
1) The program has to classes as class Loan and class Lease.
create an object for lease.
use the object and call SetLeaseData() to set value for the lease and FindInterest() to find the interset of the lease
Hint:
Lease interest amount=lease value*interest rate * period;
c++ valin bn one. me question ek avaradida mnda bn.matanm track vage me magula karaddi bn.
ane bn help ekak diyankooo
me mn karapu eka bn.mn meka kale turbo c vala
1) The program has to classes as class Loan and class Lease.
- Class Loan has public function called FindInterest() which receives value of loan,period(in months)
- and interest rate to find the interest of a loan.
- class Lease has properties as lease value,lease period and lease rate.Class maintains function as SetLeaseData()
- which set the values for lease value,lease period and lease rate.
- Class Lease also use the function FindInterest() to find the interst amount of lease for all periods(in months).
create an object for lease.
use the object and call SetLeaseData() to set value for the lease and FindInterest() to find the interset of the lease
Hint:
Lease interest amount=lease value*interest rate * period;
c++ valin bn one. me question ek avaradida mnda bn.matanm track vage me magula karaddi bn.
ane bn help ekak diyankooo
me mn karapu eka bn.mn meka kale turbo c vala

Code:
#include<iostream.h>
#include<conio.h>
class Loan{
//int vloan,period,iRate,amt;
public:
virtual void FindInterest(int a, int b, int c)=0;
/* vloan=a;
period=b;
iRate =c;
amt = vloan*period*iRate;
} */
};
class Lease:public Loan{
int lval,lperiod,IRate,amt ;
public:
void SetLeaseData(int a, int b, int c){
lval=a;
lperiod =b;
IRate=c;
}
void FindInterest(){
amt=lval*IRate*lperiod;
cout<<amt;
}
};
void main(){
clrscr();
Loan *l;
Lease p;
l=&p;
l->SetLeaseData(20,5,6);
l->SetLeaseData();
getch();
}
Last edited:


bump