This assignment deals with processing the monthly transactions of the clients of a bank. For each client, your C program should read in the account number of the client (integer), followed by the starting balance. For each transaction for this client, your program should read in the type of transaction (W or D), followed by the amount of money involved in the transaction. If the transaction is a withdrawal (W), then the amount should be subtracted from the current balance and a new current balance should be obtained. Similarly, if the transaction is a deposit (D), then the amount should be added to the running balance. After processing one transaction for a client, your program should prompt the user for more transactions, for example, the prompt might be: Any more transactions – Y/N? If the response is Y, then your program should repeat the process of asking for the type of transaction and amount, and continue processing as stated above. If the response is N, then your program should output the total amount deposited, the total amount withdrawn, and the final balance for the client along with his account number. After this output, your program should prompt for more clients to be processed. If there are more clients, then proceed to request the account number of the client along with his starting balance, and repeat the entire process regarding transactions, as stated above. Your program should validate the transaction type (W or D), as well as the response to each question (Y or N). Your program should not accept invalid responses. Even though we have been using uppercase for the type of transaction as well as the response, your program must be able to handle inputs in either lowercase or uppercase from the user. We will be looking for the most efficient code to handle this requirement. Run your program using the following data:

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...
icon
Related questions
Question

This assignment deals with processing the monthly transactions of the clients of a bank. For each
client, your C program should read in the account number of the client (integer), followed by the
starting balance. For each transaction for this client, your program should read in the type of
transaction (W or D), followed by the amount of money involved in the transaction. If the
transaction is a withdrawal (W), then the amount should be subtracted from the current balance
and a new current balance should be obtained. Similarly, if the transaction is a deposit (D), then
the amount should be added to the running balance.
After processing one transaction for a client, your program should prompt the user for more
transactions, for example, the prompt might be:

Any more transactions – Y/N?

If the response is Y, then your program should repeat the process of asking for the type of
transaction and amount, and continue processing as stated above. If the response is N, then your
program should output the total amount deposited, the total amount withdrawn, and the final
balance for the client along with his account number. After this output, your program should
prompt for more clients to be processed. If there are more clients, then proceed to request the
account number of the client along with his starting balance, and repeat the entire process
regarding transactions, as stated above.
Your program should validate the transaction type (W or D), as well as the response to
each question (Y or N). Your program should not accept invalid responses.
Even though we have been using uppercase for the type of transaction as well as the
response, your program must be able to handle inputs in either lowercase or uppercase from the
user. We will be looking for the most efficient code to handle this requirement.
Run your program using the following data:

2976
client id
829.53
starting balance
W
19.47
W
transactions
292.74
D
59.12
3621
client id
1352.86
starting balance
D
287.45
D
873.50
transactions
D
23.98
W
645.23
Transcribed Image Text:2976 client id 829.53 starting balance W 19.47 W transactions 292.74 D 59.12 3621 client id 1352.86 starting balance D 287.45 D 873.50 transactions D 23.98 W 645.23
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY