The monthly service charge is $10 (basicCharge = 10) Request the beginning balance Calculate the charge due to low balance: If the beginning balance is a negative number Print the urgent message for overdrawn the charge for this part is $15 (lowBalanceCharge = 15) If the beginning balance is below $400, the charge for this part is $15 (lowBalanceCharge = 15) Otherwise, no extra charge for this part (low BalanceCharge = 0) Request the number of checks written //Check input validation If the number of checks written is a negative number Tell the user it is an invalid input Request again the number of checks written Calculate the charge for the number of checks written (checkCharge): If # of checks is less than 20 checkCharge = 0.10 * (# of checks) otherwise if # of checks is less than 40 checkCharge = 0.08 * (# of checks) otherwise if # of checks is less than 60 checkCharge = 0.06 * (# of checks) otherwise (for 60 or more checks) checkCharge = 0.04 * (# of checks) Get the total service charge for the month: totalCharge = basicCharge + lowBalanceCharge + checkCharge Display the result in the currency format (for example, $ 500.00)
The monthly service charge is $10 (basicCharge = 10) Request the beginning balance Calculate the charge due to low balance: If the beginning balance is a negative number Print the urgent message for overdrawn the charge for this part is $15 (lowBalanceCharge = 15) If the beginning balance is below $400, the charge for this part is $15 (lowBalanceCharge = 15) Otherwise, no extra charge for this part (low BalanceCharge = 0) Request the number of checks written //Check input validation If the number of checks written is a negative number Tell the user it is an invalid input Request again the number of checks written Calculate the charge for the number of checks written (checkCharge): If # of checks is less than 20 checkCharge = 0.10 * (# of checks) otherwise if # of checks is less than 40 checkCharge = 0.08 * (# of checks) otherwise if # of checks is less than 60 checkCharge = 0.06 * (# of checks) otherwise (for 60 or more checks) checkCharge = 0.04 * (# of checks) Get the total service charge for the month: totalCharge = basicCharge + lowBalanceCharge + checkCharge Display the result in the currency format (for example, $ 500.00)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Can I please get help with this
![CS120-02, TSU
The monthly service charge is $10 (basicCharge = 10)
Request the beginning balance
Calculate the charge due to low balance:
If the beginning balance is a negative number
Print the urgent message for overdrawn
the charge for this part is $15 (lowBalanceCharge = 15)
If the beginning balance is below $400,
the charge for this part is $15 (lowBalanceCharge = 15)
Otherwise,
no extra charge for this part (lowBalanceCharge = 0)
Request the number of checks written
//Check input validation
If the number of checks written is a negative number
Tell the user it is an invalid input
Request again the number of checks written
Calculate the charge for the number of checks written (checkCharge):
If # of checks is less than 20
checkCharge = 0.10 * (# of checks)
otherwise if # of checks is less than 40
checkCharge = 0.08 * (# of checks)
otherwise if # of checks is less than 60
checkCharge = 0.06 * (# of checks)
otherwise (for 60 or more checks)
checkCharge = 0.04 * (# of checks)
Get the total service charge for the month:
totalCharge = basicCharge + lowBalanceCharge + checkCharge
Display the result in the currency format (for example, $ 500.00)
Created by Li Ma](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F549651ba-b33d-474d-abf4-48863f7a8bc4%2Fd108cfd1-a251-4beb-bf17-e7220a4228a5%2Fxoaum7r_processed.png&w=3840&q=75)
Transcribed Image Text:CS120-02, TSU
The monthly service charge is $10 (basicCharge = 10)
Request the beginning balance
Calculate the charge due to low balance:
If the beginning balance is a negative number
Print the urgent message for overdrawn
the charge for this part is $15 (lowBalanceCharge = 15)
If the beginning balance is below $400,
the charge for this part is $15 (lowBalanceCharge = 15)
Otherwise,
no extra charge for this part (lowBalanceCharge = 0)
Request the number of checks written
//Check input validation
If the number of checks written is a negative number
Tell the user it is an invalid input
Request again the number of checks written
Calculate the charge for the number of checks written (checkCharge):
If # of checks is less than 20
checkCharge = 0.10 * (# of checks)
otherwise if # of checks is less than 40
checkCharge = 0.08 * (# of checks)
otherwise if # of checks is less than 60
checkCharge = 0.06 * (# of checks)
otherwise (for 60 or more checks)
checkCharge = 0.04 * (# of checks)
Get the total service charge for the month:
totalCharge = basicCharge + lowBalanceCharge + checkCharge
Display the result in the currency format (for example, $ 500.00)
Created by Li Ma
![CS120-02, TSU
Program 4: Bank Charges
Due on Sunday, 10/16/2022, by 11:59pm
●
Lab Objectives
This lab was designed to reinforce programming concepts from Chapter 4 of C++ Programming:
Program Design Including Data Structures, 8th Edition. In this lab you will practice:
Requesting & validating input
Using selective structure to make decision
Problem Description
A bank may have the following service charges for a commercial bank account:
basic charge, which will always charge every month
check charge for the checks written, which depends on how many checks you have written in the month
charge for low balance, which will be checked and charged at the beginning of the month
Created by Li Ma
Write a program named Program4_BankCharges_YourName.cpp for the banking activities and
calculate the total monthly service charge from the bank.
The bank charges $10 per month (basic charge) plus the following check fees for a commercial
checking account (check charge):
$0.10 each for less than 20 checks
$0.08 each for 20-39 checks
$0.06 each for 40-59 checks
$0.04 each for 60 or more checks
The bank also charges an extra $15 if the beginning balance of the account falls below $400 (before
basic charge and any check fees are applied, it is low balance charge).
Program Requirements
This program shall
1. request inputs: ask for the beginning balance and the number of checks written
2. validate inputs:
a. for the beginning balance, display an urgent message indicating the account is overdrawn if a
negative value is entered
b. for the number of checks written,
i. ask user to re-enter if a negative value is entered
3. compute the bank's service fees for the month:
CS120-02, TSU
Created by Li Ma
a. fixed monthly charge ($10) - basic charge
b. charge for checks written (the amount depends on the number of checks written) -
check charge
c.
a possible extra charge ($15 if the beginning balance is below $400) - low balance
charge
4. display the bank's service fees for the month
5. add a cout statement to display the information of this program as shown in the following box
to the bottom of your program, before return statement:
This is for Program4, created by yourName on current date.
Change it to your name
Change it to the date you finished this program
The pseudocode of your program for the part to calculate the total monthly service charge is in the box
on the following page. The blocks in the PINK box are selection structures.
Submission
Snapshot your compiler window after you successfully run your program, save the picture as
Program4_BankCharges_YourName.png. Please be aware that
1. your screenshot should always include the whole compiler window, not just the result pane.
2. your result pane should be big enough that all output lines will show up.
Submit both of your program Program4_BankCharges_YourName.cpp (80%) and the picture
Program4_BankCharges_YourName.png (20%) to Blackboard via Program4 link in Assignments section
of the course page.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F549651ba-b33d-474d-abf4-48863f7a8bc4%2Fd108cfd1-a251-4beb-bf17-e7220a4228a5%2Fesbn6i_processed.png&w=3840&q=75)
Transcribed Image Text:CS120-02, TSU
Program 4: Bank Charges
Due on Sunday, 10/16/2022, by 11:59pm
●
Lab Objectives
This lab was designed to reinforce programming concepts from Chapter 4 of C++ Programming:
Program Design Including Data Structures, 8th Edition. In this lab you will practice:
Requesting & validating input
Using selective structure to make decision
Problem Description
A bank may have the following service charges for a commercial bank account:
basic charge, which will always charge every month
check charge for the checks written, which depends on how many checks you have written in the month
charge for low balance, which will be checked and charged at the beginning of the month
Created by Li Ma
Write a program named Program4_BankCharges_YourName.cpp for the banking activities and
calculate the total monthly service charge from the bank.
The bank charges $10 per month (basic charge) plus the following check fees for a commercial
checking account (check charge):
$0.10 each for less than 20 checks
$0.08 each for 20-39 checks
$0.06 each for 40-59 checks
$0.04 each for 60 or more checks
The bank also charges an extra $15 if the beginning balance of the account falls below $400 (before
basic charge and any check fees are applied, it is low balance charge).
Program Requirements
This program shall
1. request inputs: ask for the beginning balance and the number of checks written
2. validate inputs:
a. for the beginning balance, display an urgent message indicating the account is overdrawn if a
negative value is entered
b. for the number of checks written,
i. ask user to re-enter if a negative value is entered
3. compute the bank's service fees for the month:
CS120-02, TSU
Created by Li Ma
a. fixed monthly charge ($10) - basic charge
b. charge for checks written (the amount depends on the number of checks written) -
check charge
c.
a possible extra charge ($15 if the beginning balance is below $400) - low balance
charge
4. display the bank's service fees for the month
5. add a cout statement to display the information of this program as shown in the following box
to the bottom of your program, before return statement:
This is for Program4, created by yourName on current date.
Change it to your name
Change it to the date you finished this program
The pseudocode of your program for the part to calculate the total monthly service charge is in the box
on the following page. The blocks in the PINK box are selection structures.
Submission
Snapshot your compiler window after you successfully run your program, save the picture as
Program4_BankCharges_YourName.png. Please be aware that
1. your screenshot should always include the whole compiler window, not just the result pane.
2. your result pane should be big enough that all output lines will show up.
Submit both of your program Program4_BankCharges_YourName.cpp (80%) and the picture
Program4_BankCharges_YourName.png (20%) to Blackboard via Program4 link in Assignments section
of the course page.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1
Answer:
We have done in C++ programming language and also attached the code and code screenshot and output
Algorithms:
Step1: we have asked the user input for the beginning balance
Step2: we check beginning balance is negative then message urgent message for withdrawn
Step3: then we have ask the user to give the input for check
Step4: if beginning balance is less than the 400$ then calculate the charge charge based on check and calculate the charge with the basic charge +low balance charge
Step5: if beginning balance is greater than the 400$ then calculate the charge charge based on check +basic charge
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY