Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
C++ console program help
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="IT_Kollek" data-source="post: 18039644" data-attributes="member: 528229"><p>Ane bn me program eka karala diyankoo</p><p></p><p> 1) <span style="font-size: 18px">The program has to classes as class Loan and class Lease.</span></p><p><span style="font-size: 18px"> <ul> <li data-xf-list-type="ul">Class Loan has public function called FindInterest() which receives value of loan,period(in months)</li> <li data-xf-list-type="ul"> </li> <li data-xf-list-type="ul">and interest rate to find the interest of a loan.</li> </ul> <ul> <li data-xf-list-type="ul">class Lease has properties as lease value,lease period and lease rate.Class maintains function as SetLeaseData() </li> <li data-xf-list-type="ul">which set the values for lease value,lease period and lease rate.</li> </ul> <ul> <li data-xf-list-type="ul">Class Lease also use the function FindInterest() to find the interst amount of lease for all periods(in months).</li> </ul><p>use main function to find;</span></p><p><span style="font-size: 18px"> create an object for lease.</span></p><p><span style="font-size: 18px">use the object and call SetLeaseData() to set value for the lease and FindInterest() to find the interset of the lease</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">Hint: </span></p><p><span style="font-size: 18px"> Lease interest amount=lease value*interest rate * period; </span></p><p></p><p><span style="font-size: 15px">c++ valin bn one. me question ek avaradida mnda bn.matanm track vage me magula karaddi bn.</span></p><p><span style="font-size: 15px">ane bn help ekak diyankooo</span></p><p></p><p><span style="font-size: 18px">me mn karapu eka bn.mn meka kale turbo c vala <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></span></p><p></p><p></p><p>[CODE]#include<iostream.h></p><p>#include<conio.h></p><p>class Loan{</p><p>//int vloan,period,iRate,amt;</p><p> public:</p><p> virtual void FindInterest(int a, int b, int c)=0;</p><p> /* vloan=a;</p><p> period=b;</p><p> iRate =c;</p><p> amt = vloan*period*iRate;</p><p> } */</p><p>};</p><p></p><p>class Lease:public Loan{</p><p> int lval,lperiod,IRate,amt ;</p><p> public:</p><p> void SetLeaseData(int a, int b, int c){</p><p> lval=a;</p><p> lperiod =b;</p><p> IRate=c;</p><p> }</p><p> void FindInterest(){</p><p> amt=lval*IRate*lperiod;</p><p> cout<<amt;</p><p> }</p><p>};</p><p></p><p>void main(){</p><p>clrscr();</p><p>Loan *l;</p><p>Lease p;</p><p>l=&p;</p><p></p><p>l->SetLeaseData(20,5,6);</p><p>l->SetLeaseData();</p><p>getch();</p><p>}</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="IT_Kollek, post: 18039644, member: 528229"] Ane bn me program eka karala diyankoo 1) [SIZE="5"]The program has to classes as class Loan and class Lease. [LIST] [*]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. [/LIST] [LIST] [*]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. [/LIST] [LIST] [*]Class Lease also use the function FindInterest() to find the interst amount of lease for all periods(in months). [/LIST] use main function to find; 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; [/SIZE] [SIZE="4"]c++ valin bn one. me question ek avaradida mnda bn.matanm track vage me magula karaddi bn. ane bn help ekak diyankooo[/SIZE] [SIZE="5"]me mn karapu eka bn.mn meka kale turbo c vala :)[/SIZE] [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(); } [/CODE] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom