Question: C++ Given the class hierarchy below with virtual function calclnterest, explain the purpose of this virtual function. What method definitions would you need to add
C++
Given the class hierarchy below with virtual function "calclnterest", explain the purpose of this virtual function. What method definitions would you need to add in both subclasses in order to later instantiate objects in a main routine? For each of the three classes, give an example of a variable declaration that you might use for account data. (Note: Make sure you answer all three questions.) delinitions would you need he three classes, give an eram three questions.) BankAccount variable declaration? virtual double calcInterest() const SavingsAccount variable declaration? method definition? CheckingAccount variable declaration? method definition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
