Assume that bank maintains two kinds of accounts for its customers, one called savings
account and other current account. The saving accounts provide compound interest and
withdrawal facilities. The Current account provides withdrawal facilities but no interest,
current account holder should maintain a minimum balance of 10000$ and if the
balance falls below this level, a service charge is imposed a fine of 1000$.
Create a class named Account that stores Customer name, account number and type of
account. From this derive the class Current Account and Saving Account to make them
more specific to their requirements. Include the necessary methods 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 the withdrawal and update the balance
e. Check for the minimum balance, impose penalty, if necessary and update the
balance.