Question
Define a class to represent a bank account. Include the following members: Name of the depositor Account number Type of account Balance amount in the
Define a class to represent a bank account. Include the following members:
Name of the depositor Account number Type of account Balance amount in the account. the object of this class can: assign initial values of the data members deposit an amount greater than 0 withdraw an amount after checking the balance, the amount cannot exceed the balance and must be greater than 0 display name and balance.
Write a Saving account class that inherits publicly from the above Bank account class. This saving account will maintain number of months since last deposit.:
add 5% to any deposited amount greater than $100
add 10% to any deposit amount greater than $1000
add 15% to any deposit amount greater than $10 000
The Saving account will have penalty at withdrawal if number of months since last deposit is less than 12 months
15 % penalty of any withdrawal amount greater than $10 000
10 % penalty of any withdrawal amount greater than $1000
5% penalty of any withdrawal amount greater than $100
Write a main program to test the program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started