Question: Define a non-member function that creates and returns an account as a combination of two given accounts. Set this new account's balance as the total

Define a non-member function that creates and returns an account as a combination of two given accounts. Set this new account's balance as the total balance of the two given accounts and its interest rate as a higher one of the two given accounts. For example, if account1 has the balance $2500 and the interest rate 0.045, and account2 has the balance $500 and the interest rate 0.02, the new created account then has the balance $3000 and the interest rate 0.045.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!