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
Hi All.... any Guru expert out there...i have the follwing scenario below...and am seeking help from anyone able come up with this small code ;) in C++...... base class BankAccount with derived classes SavingsAccount and ChequeAccount [u]BankAccount attributes[/u] :- [i]account_number[/i] [i]holder[/i] [i]start_balance[/i] [u]SavingsAccount attributes [/u] [i]withdrawal_notice[/i] [i]intrest_rate[/i] [i]methods to return this attribues[/i] [u]ChequeAccount attributes[/u] [i]allowed overdraft[/i] [i]method to return the value[/i] In both cases initial values of additional attributes should be set using parameters to the constructor I need to explicitly inherit the parameters from the base class constructor in the base class constructor in the defination of both of derived class constructor I also need to instantiate an object of SavingsAccount class and set the constructor parameters to:- start_balance= $1000 withdrawal_notice = 30 days intrest_rate = 3.5% account_number = 1 holder = "binary" I also need to instantiate an object of ChequeAccount class and set the constructor parameters to:- start_balance = $0.00 overdraft_limit = $500 account_number = 2 holder = " principle" Lastly i need to display the details of both savings account and cheque account object... [/i]pls help me to came up a code in C++ to do the above[i] ~Sig coming soon~
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »