Question: code must be done in c++ A bank in your town updates its customers' accounts at the end of each month. The bank offers two

code must be done in c++

A bank in your town updates its customers' accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every customer must maintain a minimum balance. If a customer's balance falls below the minimum balance, there is a service charge of $10.00 for savings accounts and $25.00 for checking accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows:

?

1

2

a. Savings accounts receive 4% interest.

b. Checking accounts with balances of up to $5,000 more than the minimum balance receive 3% interest; otherwise, the interest is 5%.

Write a program that reads a customer's account number (int type), account type (char s for savings, c for checking), minimum balance that the account should maintain, and current balance. The program should then prints a report with (1) an appropriate heading and (2) that shows the account number, account type, and current balance for each customer in the file.

Use the structure chart below:

Test your program by running it on the five accounts, using the following data file name "infile.txt":

?

1

2

3

4

5

46728 S 1000 2700

87324 C 1500 7689

79873 S 1000 800

89832 C 2000 3000

98322 C 1000 750

Your output should look like:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

****************************************

Account Number: 46728

Account Type: Savings

Account Balance: $2808.00

****************************************

Account Number: 87324

Account Type: Checking

Account Balance: $8073.45

****************************************

Account Number: 79873

Account Type: Savings

Account Balance: $790.00

****************************************

Account Number: 89832

Account Type: Checking

Account Balance: $3090.00

****************************************

Account Number: 98322

Account Type: Checking

Account Balance: $725.00

main Acct type Acct type balance Acct Acc no Acct minimu balance ce Acc type charge minimum balance balance Compute Print Acct Service balance report charge interest Compute interest

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!