Give a definition for the function with the following function declaration. The class BankAccount is defined in Display 10.5. BankAccount newAccount(BankAccount oldAccount); //Precondition: oldAccount...



Give a definition for the function with the following function declaration.


The class BankAccount is defined in Display 10.5.


BankAccount newAccount(BankAccount oldAccount);


//Precondition: oldAccount 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 oldAccount.


For example, after this function is defined, a program could contain the


following:


BankAccount account3, account4;


account3.set(999, 99, 5.5);


account4 = newAccount(account3);


account4.output(cout);


This would produce the following output:



Account balance $0.00



Interest rate 5.50%



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here