Write a c++ program for a bank in your town that updates its customers’ accounts at the end of each month. The bank offers two types of accounts: savings and cheque. Every customer must maintain a minimum balance. Minimum balances for the accounts are: Savings : R 1000.00 Cheque: R 1500.00 If a customer’s balance falls below the minimum balance, there is a service charge of R50.00 for savings accounts and R100.00 for cheque accounts. If the balance at the end of the month is at least the minimum balance, the client receives interest as follows: Savings accounts receive 4% interest on the balance. Cheque accounts with balances of up to R 5000.00 more than the minimum balance receive 3% interest; otherwise, accounts with balances more than R 5000.00 more than the minimum balance receive 5% interest. Write a c++ program that requests the user to enter a customer’s account number (int type), account type (char type - S for savings, C for checking) and current balance. The updated balance must be displayed. The program should continue updating accounts until the value 999 is entered as an account number. The number of savings and cheque account updated determined and must be displayed – see example output. Note: The minimum balance amount for savings and cheque accounts must be declared as constants. The program must accept capital or small letters as account types. The updated balance displayed must be formatted to two decimal places. Test data: 123 S 2700 878 C 7689 789 S 800 Example of Computer output: Updating bank accounts Enter your account number (999 to exit): 123 Enter account type (S for savings, C for cheque): s Enter your current balance: 2700 Updated balance: R 2808.00 Enter your account number (999 to exit): 878 Enter account type (S for savings, C for cheque): C Enter your current balance: 7689 Updated balance: R 8073.45 Enter your account number (999 to exit): 789 Enter account type (S for savings, C for cheque): s Enter your current balance: 800 Updated balance: R 750.00 Enter your account number (999 to exit): 999 Number of clients with savings accounts: 2 Number of clients with cheque accounts: 1
Write a c++
savings and cheque. Every customer must maintain a minimum balance.
Minimum balances for the accounts are:
Savings : R 1000.00
Cheque: R 1500.00
If a customer’s balance falls below the minimum balance, there is a service charge of R50.00 for savings accounts and
R100.00 for cheque accounts. If the balance at the end of the month is at least the minimum balance, the client
receives interest as follows:
Savings accounts receive 4% interest on the balance.
Cheque accounts with balances of up to R 5000.00 more than the minimum balance receive 3% interest;
otherwise, accounts with balances more than R 5000.00 more than the minimum balance receive 5% interest.
Write a c++ program that requests the user to enter a customer’s account number (int type), account type (char type - S for savings, C for checking) and current balance. The updated balance must be displayed.
The program should continue updating accounts until the value 999 is entered as an account number.
The number of savings and cheque account updated determined and must be displayed – see example output.
Note:
The minimum balance amount for savings and cheque accounts must be declared as constants.
The program must accept capital or small letters as account types.
The updated balance displayed must be formatted to two decimal places.
Test data:
123 S 2700
878 C 7689
789 S 800
Example of Computer output:
Updating bank accounts
Enter your account number (999 to exit): 123
Enter account type (S for savings, C for cheque): s
Enter your current balance: 2700
Updated balance: R 2808.00
Enter your account number (999 to exit): 878
Enter account type (S for savings, C for cheque): C
Enter your current balance: 7689
Updated balance: R 8073.45
Enter your account number (999 to exit): 789
Enter account type (S for savings, C for cheque): s
Enter your current balance: 800
Updated balance: R 750.00
Enter your account number (999 to exit): 999
Number of clients with savings accounts: 2
Number of clients with cheque accounts: 1
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images