Give a definition for the function with the following function declaration.
The class BankAccount is defined in Display 10.5.
BankAccount new_account(BankAccount old_account);
//Precondition: old_account has previously been given a value
//(that is, its member variables have been given values).
//Returns the value for a new account that has a balance of zero
//and the same interest rate as the old_account.
For example, after this function is defined, a program could contain the
following:
BankAccount account3, account4;
account3.set(999, 99, 5.5);
account4 = new_account(account3);
This would produce the following output:
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.