Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help C++ code help needed! please take your time and ensure the code is correct, thank you so much. . Please ecusure that the
Please help C++ code help needed!
please take your time and ensure the code is correct, thank you so much.
.
Please ecusure that the output looks like this --->
Bank Accounts Implement a class Account. The class object account has: - a data member balance (double balance) - class member functions to o void deposit (double amount); - void withdraw (double amount); - o double getBalance() const; Implement a class Bank. This bank has two class data member, Account checking and Account savings, of the type Account. Implement member functions: class Bank \{ public: Bank(); Bank(double checkingAmount, double savingsAmount); // deposit member function will call Account member function deposit void deposit(double amount, string account void withdraw(double amount, string account); void transfer(double amount, string account); void printBalances() const; ????? checking; // change ????? with correct data type for varia checking??????? savings; // use correct data type for variable savings \}; private: Charge a $5 penalty if an attempt is made to withdraw more money than what is available in the account. For example, if your checking account balance is 1000 and you want to withdraw 1500 , then your program should not allow the withdrav in addition, you need to change a over drawn penalty. So you balance would be $1000$5=$995. Here the account string is " S " or " C ". " S " is for savings account. "C" is for checking account. For the deposit or withdraw, it indicates which account is affected. For a trans it indicates the account from which the money is taken; the money is automatically Use global CONSTANT for penalty (PENALTY). Don't hard code the number in your code. You may need to add more member variables and functions to the classes than those listed above, and you need to implement these member functions. You must store class Account and class Bank in a .h file. You must use safe guard (\#ifndef) in the .h file. Implementation of the class member functions must be in a separate cpp file. Use the c++ main program file below to run the program. In your main program, the the exact number of code as below: Bank my_bank; coutStep 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