. Write a program that uses class members and instance members to manipulate different
bank accounts. Bank accounts can be of two types. In one type the initial amount is Rs
25000 and in other type the initial amount is Rs 45000. Use a class field to keep count of
no. of account opened. Common rate of interest is 8.75% p.a .The interest is to be
calculated for one year and then balance is to be updated
Answers
Answered by
0
Answer:
- First create the classes: you want two types, probably derived from a third abstract base class called Account. One type when constructed starts with 25,000; the other with 45,000.
- Add a member method to the Account class which calculates the interest and updates teh balance.
- This isn't complicated - it's pretty basic stuff as far as classes go - so re-read your recent course notes (and the relevant course book chapters if you have one) and think about the task. It's probably less than a dozen lines of code to set this up - and probably double that to test that it works! :laugh:
Similar questions