Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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:

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:

[Program Structure Chart]

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

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:

**************************************** Account Number: 46728 Account Type: Savings Account Balance: $2808.00 **************************************** Account Number: 87324 Account Type: Checking Account Balance: $7943.45 **************************************** Account Number: 79873 Account Type: Savings Account Balance: $821.60 **************************************** Account Number: 89832 Account Type: Checking Account Balance: $3090.00 **************************************** Account Number: 98322 Account Type: Checking Account Balance: $746.75

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

Step: 3

blur-text-image

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

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions

Question

What do you think you have to offer a company like Dandy Toys?

Answered: 1 week ago