Question: Define a class bank account that includes the following data members Name of Depositor Account Number Type of Account (Saving or current)
Define a class bank account that includes the following data members
- Name of Depositor
- Account Number
- Type of Account (Saving or current)
- Balance amount in the account
The class contains the following member function
- A constructor to assign initial values
- Deposit function to deposit some amount. It should accept the amount as parameter. Withdraw function to withdraw an amount after checking the balance. It should accept the amount as parameter.
- Display function to display name and balance.
- Overload binary + operator that adds the balance of one account to another account. It should accept an object as parameter and add the values of the parameter to the calling object.
Step by Step Solution
3.33 Rating (147 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
