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.
Write a Code in C#
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 cur_acct and sav_acct to make them more specific to their requirements using the concept of Inheritance. Include necessary member functions in order to achieve the following tasks:
▪ Accept deposit from a customer and update the balance.
▪ Display the balance.
▪ Compute and deposit interest.
▪ Permit withdrawal and update the balance.
Check for minimum balance, impose penalty, necessary, and update the balance
Trending now
This is a popular solution!
Step by step
Solved in 2 steps