Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago