Question: Define a class for a bank account that includes the following data members/ Name of depositor, account number, type of account, balance amount in the
Define a class for a bank account that includes the following data members/ Name of depositor, account number, type of account, balance amount in the account. The class also contains the following member functions: ii. V. A constructor to assign initial default value. A constructor to assign values from the user. Deposit function to deposit some amount. It should display error message if deposited amount is less than or equal to 0, and not add that amount in balance amount. Withdraw function to withdraw amount from an account. It should display an error message if withdrawn amount is greater that balance amount in the account or if withdrawn amount is negative
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
