No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[code=cplusplus] class Base { //private methods void printMyType() { cout << "this is base type" << endl; } //public methods void printAllInfo() { cout << "this An accout" << endl; printMyType(); } }; //end base class class derived : public Base { //private method void printMyType() { cout << "this … |
|
Hi there I have the following problem! Please help! [code=cplusplus]class Base { //private methods void printMyType() { cout << "this is base type" << endl; } //public methods void printAllInfo() { cout << "this An accout" << endl; printMyType(); } }; //end base class class derived : public Base { … |
|
Ok i have a parent class called MobileAccount, it has a public method called void PrintAccountInfo(), and within this PrintAccountInfo() method I call a private method called void PrintAccountType(). Now as I mentioned the parent class called MobileAccount has a subclass called AdvancedAccount, it too has a method called PrintAccountInfo() … |
|
I have the following class called Advanced Account, which inheritis from MobileAccount. The constructor for advanced account is defined below. AdvancedAccount::AdvancedAccount(MobileNumber & rnum, string & rname) :MobileAccount(rnum,rname) { mFreeCalls=0; mMaxFreeCalls=3; mMinTopup=1.0; } I then also have the following overloaded operator described below which makes LHS=RSH. AdvancedAccount& AdvancedAccount:perator= (const AdvancedAccount& raa) … |