c++ help please.
Savings accounts: Suppose that the bank offers two types of savings accounts: one that has no minimum balance and a lower interest rate and another that requires a minimum balance but has a higher interest rate (the benefit here being larger growth in this type of account).
Checking accounts: Suppose that the bank offers three types of checking accounts: one with a monthly service charge, limited check writing, no minimum balance, and no interest; another with no monthly service charge, a minimum balance requirement, unlimited check writing and lower interest; and a third with no monthly service charge, a higher minimum balance requirement, a higher interest rate, and unlimited check writing.
Certificate of deposit (CD): In an account of this type, money is deposited and left for some time, and these accounts draw higher interest rates than savings or checking accounts. Suppose that you purchase a CD for six months. We then say that the CD will mature in six months (i.e. you can take the money back out). The penalty for early withdrawal is steep.
Note that the classes bankAccount and checkingAccount are abstract. That is, we cannot instantiate objects of these classes. The other classes in the above figure above are not abstract.
bankAccount: Every bank account has an account number, the name of the owner, and a balance. Therefore, instance variables such as name, accountNumber, and balance should be declared in the abstract class bankAccount. Some operations common to all types of accounts are retrieve account owners name, account number, and account balance; make deposits; withdraw money; and create monthly statements. So include functions to implement these operations. Note that some of these functions will be pure virtual. (Which ones?)
checkingAccount: A checking account is a bank account. Therefore, it inherits all the properties of a bank account. Because one of the objectives of a checking account is to be able to write checks, include the pure virtual function writeCheck to write a check.
serviceChargeChecking: A service charge checking account is a checking account. Therefore, it inherits all the properties of a checking account. For simplicity, assume that this type of account does not accrue any interest, has a monthly operating cost of $10/month, allows the account holder to write a limited number of checks each month (max 5 checks per month), charges the account holder $5 per check written over the max number of checks in a given month, and does not require any minimum balance. Include appropriately named constants, instance variables, and functions in this class.
noServiceChargeChecking: A checking account with no monthly service charge is a checking account. Therefore, it inherits all the properties of a checking account. Furthermore, this type of account accrues interest (2%), allows the account holder to write checks, and requires a minimum balance ($1000).
highInterestChecking: A checking account with high interest is a checking account with no monthly service charge. Therefore, it inherits all the properties of a no service charge checking account. Furthermore, this type of account pays higher interest (5%) and requires a higher minimum balance ($5000) than the no service charge checking account.
savingsAccount: A savings account is a bank account. Therefore, it inherits all the properties of a bank account. Furthermore, a savings account accrues interest at a 3% rate, compounded monthly.
highInterestSavings: A high-interest savings account is a savings account. Therefore, it inherits all the properties of a savings account. It has a minimum balance ($2500) but has a higher interest accrual rate of (5%).
The main:
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include "bankAccount.h"
#include "savingsAccount.h"
#include "highInterestSavings.h"
#include "noServiceChargeChecking.h"
#include "serviceChargeChecking.h"
#include "highInterestChecking.h"
#include "certificateOfDeposit.h"
#include "checkingAccount.h"
using namespace std;
int main()
{
// array of bankAccount type pointers
// pointers so that you can store any of the inherited
// account types without a slicing (information loss) problem
bankAccount *accountsList[6];
// create six accounts, one of each type
accountsList[0] = new savingsAccount("Bill", 10200, 2500);
accountsList[1] = new highInterestSavings("Susan", 10210, 2000);
accountsList[2] = new noServiceChargeChecking("John", 20100,
3500);
accountsList[3] = new serviceChargeChecking("Ravi", 30100, 1800);
accountsList[4] = new highInterestChecking("Sheila", 20200,
6000);
accountsList[5] = new certificateOfDeposit("Hamid", 51001, 18000,
0.075, 18);
// calculate and print january statements
cout << "January:\n-------------" << endl;
for (int i = 0; i < 6; i++)
{
accountsList[i]->createMonthlyStatement();
accountsList[i]->print();
cout << endl;
}
// calculate and print january statements
cout << "\nFebruary:\n-------------" << endl;
for (int i = 0; i < 6; i++)
{
accountsList[i]->createMonthlyStatement();
accountsList[i]->print();
cout << endl;
}
//
for (int i = 0; i < 6; i++)
{
accountsList[i]->withdraw(500);
}
// calculate and print january statements
cout << "\nMarch:\n-------------" << endl;
for (int i = 0; i < 6; i++)
{
accountsList[i]->createMonthlyStatement();
accountsList[i]->print();
cout << endl;
}
system("pause");
return 0;
}
For any account type that requires a minimum balance, withdrawal amounts that would bring the account below the minimum balance should be strictly prohibited. Develop a short protected member function that would check this.
let minimum balance must be 500 so the function is like
withdraw(int n)
{
minimum=500;
if(n<=minimum)
{
printf("Amount couldn't be withdraw");
}
else
{
savingsamount=savingsamount-n;
printf("successfully withhdrawl the amount");
}
}
c++ help please. Savings accounts: Suppose that the bank offers two types of savings accounts: one...
C++
Banks offer various types of accounts, such as savings,
checking, certificate of deposits, and money market, to attract
customers as well as meet their specific needs. Two of the most
commonly used accounts are savings and checking. Each of these
accounts has various options. For example, you may have a savings
account that requires no minimum balance but has a lower interest
rate. Similarly, you may have a checking account that limits the
number of checks you may write....
Textbook help its not in textbook solutions from the textbook C++ Programming 7th edition Malik,D.S Chapter 12 programming exercise 5 Banks offer various types of accounts, such as savings, checking, certificateof deposits, and money market, to attract customers as well as meet their specific needs. Two of the most commonly used accounts are savings andchecking. Each of these accounts has various options. For example, you mayhave a savings account that requires no minimum balance but has a lower interest rate....
This is in C++ (using IDE Visual Studio). I am seeking
assistance ASAP. Please include a static member in the class to
automatically assign account numbers (used to process up to 10
accounts) and have the user include their first and last name.
Thank you!
13. a. Define the class bankAccount to store a bank customer's account number and balance. Suppose that account number is of type int, and balance is of type double. Your class should, at least, provide...
C++ Design a class bankAccount that defines a bank account as an ADT and implements the basic properties of a bank account. The program will be an interactive, menu-driven program. a. Each object of the class bankAccount will hold the following information about an account: account holder’s name account number balance interest rate The data members MUST be private. Create an array of the bankAccount class that can hold up to 20 class objects. b. Include the member functions to...
C++ Simple code please Thank you in advance
B. Write a C++ program as per the following specifications: a. Define the class BankAccount to store a bank customer's account number and balance. Suppose that account number is of type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors. b. Every bank...
14 b. Every bank offers a checking account. Derive the class checkingAccount from the class bankAccount (designed in part (a)). This class inherits members to store the account number and the balance from the base class. A customer with a checking account typically receives interest, maintains a minimum balance, and pays service charges if the balance falls below the minimum balance. Add member variables to store this additional information. In addition to the operations inherited from the base class, this...
A)Define the class bankAccount to store a bank customer's account number and balance .Suppose that account number is of type int m and balance is of type double . Your class should at least , provide the account number m retrive the balance , depositand withdraw money , and print account information. Add appropriate constructors.B) Every bank offers a checking account . Drive the class checkingAccount from the class bankAccount( design in part (a).This class inherits member to store theaccount...
C++ -- Vector of Bank Accounts (15 pts) Please help! :( Use csegrid or Clion for this part Add on to the lab12a solution(THIS IS PROVIDED BELOW). You will add an overload operator function to the operator << and a sort function (in functions.h and functions.cpp) Print out the customer’s name, address, account number and balance using whatever formatting you would like Sort on account balance (hint: you can overload the < operator and use sort from the...
(C++) How do I develop a polymorphic banking program using an already existing Bank-Account hierarchy? For each account in the vector, allow the user to specify an amount of money to withdraw from the Bank-Account using member function debit and an amount of money to deposit into the Bank-Account using member function credit. As you process each Bank-Account, determine its type. If a Bank-Account is a Savings, calculate the amount of interest owed to the Bank-Account using member function calculateInterest,...
C++ Design and implement a hierarchy inheritance system of banking, which includes Savings and Checking accounts of a customer. Inheritance and virtual functions must be used and applied, otherwise, there is no credit. The following features must be incorporated: 1. The account must have an ID and customer’s full name and his/her social security number. 2. General types of banking transactions for both accounts, Checking and Savings: withdraw, deposit, calculate interest (based on the current balance, and if it was...