OZONE Asylum
Forums
OZONE
C++ Constructors in Derived Classes
This page's ID:
28616
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[code] #include <iostream.h> class BankAccount { protected: int account_number; char holder [30]; float start_balance; public: BankAccount( int act_no,char* holdr,float stb) { account_number = act_no; strcpy(holder,holdr); start_balance = stb; } void display() { cout<<" Account Number ="<<account_number<<endl; cout<<" Holder ="<<holder<<endl; cout<<" Start Balance ="<<start_balance<<endl; } }; class SavingAccount : public BankAccount { private: int withdrawal_notice; float intrest_rate; public: SavingAccount(int acct_no,char* hldr,float sb,int with_ntc,float int_rt):BankAccount(acct_no,hldr,sb) { withdrawal_notice = with_ntc; intrest_rate = int_rt; } void show() { cout<<"Withdrawal Notice ="<<withdrawal_notice<<endl; cout<<"Intrest Rate"<<intrest_rate<<endl; } } [/code] hyperbole:- this is what i have so far....but am stuck at this point...wouldnt mind your help here... ~Sig coming soon~ [small](Edited by [url=http://www.ozoneasylum.com/user/2622]binary[/url] on 11-08-2006 13:28)[/small] Edit Tyberius Prime : Some code tags and a little bit of indention to make the code more readable... [small](Edited by [url=http://www.ozoneasylum.com/user/1424]Tyberius Prime[/url] on 11-08-2006 21:28)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »