Assume that a bank maintains two kinds of accounts for customers,one called as Savings account and the other as Current Account.The Savings account provide compound interest and withdrawal facilities but no cheque book facility.The Current Account provides cheque book facilty but no interest. Current Account holders should also maintain a minimum balance and if the balance falls below this level, a service charge is imposed.
Create a Class Account that stores customers name,account number and type of account.From this derive the classes Cur-Acct and Sav-Acct to make them more specific to their requirements.Include necessary members functions in order to achieve the following tasks:
a) Accept deposit from a customer and update the balance.
b) Display the balance
c) Compute and deposit interest
d)Permit withdrawal and update the balance.
Comments
Leave a comment