Question: Consider the class specification (interface) for the class BankAccount below class BankAccount { public BankAccount (); BankAccount (int accNr, double initBalance), void setAccNr(int nr); int



Consider the class specification (interface) for the class BankAccount below class BankAccount { public BankAccount (); BankAccount (int accNr, double initBalance), void setAccNr(int nr); int getAccNr() const; double getBalance( ) const; void deposit (double amnt), void withdraw(double amnt); void displayAccInfo() const; //display accur and balance private int accNr; double balance, } 4.4 Member function postInterestRate() adds earned interest to the balance Show how to adapt class BankAccount to allow postInterestRate() to access the member vanable balance by name and explain why the adaptation is done in this way (2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
