daily pastebin goal


a guest Jan 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (1) (10 pts) Define a Deposit class. This class has two properties: amount of deposit (p)
  2. and annual interest rate (r). A constructor is needed for instantiation and initialization.
  3. The Deposit class assumes that the amount of interest is paid to the depositor at the
  4. end of each month. The class has a function that calculates the balance amount (A)
  5. after n years using the following formula:
  6. A = p * (1 + n*r)
  7. The function takes three input values (p, r, n) and returns A.
  8. (2) (10 pts) Define a CompoundInterestDeposit class that is a sub-class of the Deposit
  9. class. This class assumes that the amount of deposit rises because the interest is
  10. added to the deposit at the end of each year. This class has a overloaded function
  11. that calculates the balance amount (A) after
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand