Question: C++ USING CLASSES INHERITANCE INCLUDE ACCOUNT.H, ACCOUNT.CPP, SAVINGSACCOUNT.H, SAVINGSACCOUNT.H.CPP, CHECKINGACCOUNT.H, CHECKINGACCOUNT.CPP, AND MAIN.CPP Create a bank with two different types of bank accounts available. Each
C++ USING CLASSES INHERITANCE
INCLUDE ACCOUNT.H, ACCOUNT.CPP, SAVINGSACCOUNT.H, SAVINGSACCOUNT.H.CPP, CHECKINGACCOUNT.H, CHECKINGACCOUNT.CPP, AND MAIN.CPP
Create a bank with two different types of bank accounts available. Each type of account has the following information: the account starts at zero balance so the user can deposit and withdraw money. 1) A first and last name for the account holder. 2) A routing number for the bank. 3) An account number. 4) A balance amount. 5) A transaction history, the transaction history must be a Vector 6) Methods for withdrawing money, depositing money, checking the account balance, and checking the transaction history.
7) The first type of Account, a "Savings Account", will inherit from "Account" and introduce the following features: Maintain a count of the number of withdrawls and, if it exceeds 6, reject the withdrawl. Not allow overdraft - if the withdrawl amount exceeds the account balance, reject the transaction.
8) The second type of Account, a "Checking Account", will inherit from "Account" and introduce the following features: If the user attempts to withdraw more than they have available in their account, apply an overdraft fee of $35. Allow total overdraft of up to $500 (including fees). If the account withdrawl + fees will make the user more than $500 overdrafted then reject the transaction.
INITIAL TEMPLATE :
#ifndef ACCOUNT_H #define ACCOUNT_H #include
double getBalance();
//ADD TRANSACTION HISTORY VECTOR
private: std::string firstName; std::string lastName;
std::string accountNumber: std::string routingNumber; double balance; };
=============================================== SavingAccount.h
#ifndef SAVINGS_H #define SAVINGS_H #include
========================= CheckingAccount.h
#ifndef CHECKING_H #define CHECKING_H #include
======================================== main.cpp
#include "SavingsAccount.h" #include "CheckingAccount.h" #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
