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() decribed below.
void AdvancedAccount::PrintAccountInfo() {
MobileAccount::PrintAccountInfo();
PrintAccountType();
}
However because AdvancedAccount() has its own PrintAccountType() method I want it to overrun the
PrintAccountType() method within the MobileAccount::PrintAccountInfo().
The above code does not work, it prints the AccountType of MobileAccount, i.e when MobileAccount::PrintAccountInfo() is called, then it prints the account type of AvancedAccount.
Please can someone advise me of how to fix my code.
Since both PrintAccountInfo() mehtods are private it doesnt seem to like it when I declare the method
as virtual.
Please can someone help
Thanks