Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Question 1(5 Marks) (Polymorphic Banking Program Using Account Hierarchy)
  2. Develop a polymorphic banking program using the Account created in Lab No 2. Create
  3. a vector of Account pointers to SavingAccount and CheckingAccount objects. For each
  4. Account in the vector, allow the user to specify an amount of money to withdraw from
  5. the Account using member function debit and an amount of money to deposit member
  6. function credit. As you process each Account, determine its type. If an Account is a
  7. SavingAccount, calculate the amount of interest owed to the Account using member
  8. function calculateInterest, then add the interest to account balance using member function
  9. credit. After processing an Account, print the updated account balance obtained by
  10. invoking base-class member function getBalance.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement