Question: Complete the following program: Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the

Complete the following program:

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holders name (string), account number (int), account type (string, checking/saving), balance (double), and interest rate (double). Add appropriate member functions to manipulate an object. Your program only needs to deal with one account. Write a test program to illustrate how to use your class.

(1)

Make sure to realize the information hiding by creating 3 files: bankAccount.h, bankAccountImp.cpp and testProgram.cpp

Include necessary comments

Create the project, run the project, do a screen shot of a sample run of your project and paste it here

Copy and paste all your code here

As an example, a sample run should look similar to the following (realize the same functionalities):

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

1

Enter customer's name: zhu wang

Enter account type (checking/savings): checking

Enter the account number you would like to use: 12345

Enter amount to be deposited to open account: 300

Enter interest rate (as a percent): 0.8

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

2

Enter account number:

123

Invalid customer id.

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

2

Enter account number:

12345

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

1

Enter amount to be deposited: 20

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $320.00

Interest Rate: 0.80%

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

2

Enter amount to be withdrawn: 160

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $160.00

Interest Rate: 0.80%

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

9

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $160.00

Interest Rate: 0.80%

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

9

File to submit:

Create a folder containing your project folder and this word document, zip this folder and name it as LastName_FirstName_PE2.zip

Complete the following program:

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holders name (string), account number (int), account type (string, checking/saving), balance (double), and interest rate (double). Add appropriate member functions to manipulate an object. Your program only needs to deal with one account. Write a test program to illustrate how to use your class.

(1)

Make sure to realize the information hiding by creating 3 files: bankAccount.h, bankAccountImp.cpp and testProgram.cpp

Include necessary comments

Create the project, run the project, do a screen shot of a sample run of your project and paste it here

Copy and paste all your code here

As an example, a sample run should look similar to the following (realize the same functionalities):

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

1

Enter customer's name: zhu wang

Enter account type (checking/savings): checking

Enter the account number you would like to use: 12345

Enter amount to be deposited to open account: 300

Enter interest rate (as a percent): 0.8

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

2

Enter account number:

123

Invalid customer id.

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

2

Enter account number:

12345

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

1

Enter amount to be deposited: 20

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $320.00

Interest Rate: 0.80%

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

2

Enter amount to be withdrawn: 160

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $160.00

Interest Rate: 0.80%

1: Enter 1 to make a deposit.

2: Enter 2 to withdraw.

3: Enter 3 to check balance.

9: Enter 9 to exit.

9

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

3

Account Holder Name: zhu wang

Account Type: checking

Account Number: 12345

Balance: $160.00

Interest Rate: 0.80%

1: Enter 1 to add a new customer.

2: Enter 2 for an existing customer.

3: Enter 3 to print customers data.

9: Enter 9 to exit the program.

9

File to submit:

Create a folder containing your project folder and this word document, zip this folder and name it as LastName_FirstName_PE2.zip

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!