Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This project is to be done in C++ Design a generic class to hold the following information about a bank account: Balance . Number of

image text in transcribedimage text in transcribed

This project is to be done in C++

Design a generic class to hold the following information about a bank account: Balance . Number of deposits this month Number of withdrawals Annual interest rate The class should have the following member functions Constructor: accept arguments for balance and interest rate deposit: a virtual function that accepts an argument for the amount of the deposit withdrawal: a virtual function that accepts an argument for the amount of the withdrawal calclnt: a virtual function that updates the balance by calculating the monthly interest earned by the account, and adding this interest into the balance . Next, design a savings account class; derived from the generic account class, the savings account class should have the following members status (to represent an active or inactive account) If the balance of a savings account falls below $25, it becomes inactive. (The status member could be a flag variable.) No more withdrawals may be made until the balance is raised above $25, at which time the account becomes active again. The savings account class should have the following member functions withdraw: A function that checks to see if the account is inactive before a withdrawal is made. (No withdrawal will be allowed if the account is not active) a withdrawal is then made by calling the base class version of the function. .Deposit: a function that checks to see if the account is inactive before a deposit is made. If the account is inactive and then deposit brings the balance above $25, the account becomes active again. The deposit is then made by calling the base class version of the function

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

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions