Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IT MUST BE IN C++ LANGUAGE Banks has many kindsof accounts: savings, checking, certificate of deposits, and money market. These accounts are used serve customers

IT MUST BE IN C++ LANGUAGE

Banks has many kindsof accounts: savings, checking, certificate of deposits, and money market. These accounts are used serve customers as well as meetingtheir specific needs. The most commonof these 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. Another type of account that is used to save money for the long term is certificate of deposit (CD). In this programming exercise, you use abstract classes and pure virtual functions to design classes to manipulate various types of accounts. For simplicity, assume that the bank offers three types of accounts: savings, checking, and certificate of deposit, as described next.

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 and has a higher interest rate.

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 requirement, a higher interest rate, and unlimited check writing.

Certificate of deposit (CD):In an account of this type, money is left for some time, and these accounts draw higher interest rates than savings or checking accounts. Suppose that you purchase aCD for six months. Then we say that the CD will mature in six months. The penalty for early withdrawal is stiff.

image text in transcribed

Note that the classes BankAccount and CheckingAccount are abstract. That is, wecannot instantiate objects of these classes. The other classes are notabstract.

BankAccount: Every bank account has an account number, the name of the owner, anda balance. Therefore, instance variables such as name, accountNumber, and balanceshould be declared in the abstract class BankAccount. Some operations common toall types of accounts are retrieve account owners name, account number, and accountbalance; make deposits; withdraw money; and create monthly statements. So,includefunctions to implement these operations. Some of these functions will be pure virtual.

CheckingAccount: A checking account is a bank account. Therefore, it inherits allthe properties of a bank account. Because one of the objectives of a checking accountis tobe able to write checks, include the pure virtual function writeCheck to write acheck.

ServiceChargeChecking: A service charge checking account is a checking account.Therefore, it inherits all the properties of a checking account. For simplicity, assumethat this type of account does not pay any interest, allows the account holder to writea limited number of checks each month, and does not require any minimum balance.Include appropriate named constants, instance variables, and functions in this class.

NoServiceChargeChecking: A checking account with no monthly service charge isa checking account. Therefore, it inherits all the properties of a checking account.Furthermore, this type of account pays interest, allows the account holder to writechecks, and requires a minimum balance.

HighInterestChecking: A checking account with high interest is a checking accountwith no monthly service charge. Therefore, it inherits all the properties of a no servicecharge checking account. Furthermore, this type of account pays higher interest andrequires a higher minimum balance than the no service charge checking account.

SavingsAccount: A savings account is a bank account. Therefore, it inherits all theproperties of a bank account. Furthermore, a savings account also pays interest.

HighInterestSavings: A high-interest savings account is a savings account.Therefore, it inherits all the properties of a savings account. It also requires a minimumbalance.

CertificateOfDeposit: A certificate of deposit account is a bank account. Therefore,it inherits all the properties of a bank account. In addition, it has instance variables tostore the number of CD maturity months, interest rate, and the current CD month.

Write the definitions of the classes described above together withatest program and split your files into the following header(.h)and implementation (.cpp) files:

1.accounts.cpp: includes the mainfunction.

2.bankAccounts.h

3.certificateOfDeposit.h

4.checkingAccount.h

5.highInterestChecking.h

6.highInterestChecking.h

7.noServiceChargeChecking.h

8.savingsAccount.h

9.serviceChargeChecking.h

In your main function,

1.Create adynamic array of pointers to BankAccountand store a number of different objects of bank accounts.

The declaration starts like this

BankAccount**accounts = new ...

image text in transcribed

BankAccount CheckingAccount CertificateOfDeposit Savings Account ServiceChargeChecking NoServiceChargeChecking High InterestChecking High InterestSavings BankAccount Bank Account Savings Account CertificateOfDeposit High InterestSavings Branch 1 Branch 2

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

What should the professor continue doing?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago