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 provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility 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 customer name, account number and type of account. From this derive the classes curacct and savacct to make them more specific to their requirements. Include necessary member functions in order to achieve the following tasks: (a) Accept deposit from a costumer and update the balance.
(b) Display the balance
(c) Compute and deposit interest.
(d) Permit withdrawal and update the balance.
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 provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility 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 customer name, account number and type of account. From this derive the classes currentaccount and savingsaccount to make them more specific to their requirements. Include necessary member functions in order to achieve the following tasks: (a) Accept deposit from a costumer and update the balance.
(b) Display the balance
(c) Compute and deposit interest.
(d) Permit withdrawal and update the balance.
Check for the minimum balance, impose penalty, necessary, and update the balance.