You will need to submit: A copy of the Module 5 lab document with answers for the self-test exercises as specified on the lab document. Name this document “Lab5SelfTest” The source code for the Bank...



You will need to submit:





  • A copy of the Module 5 lab document with answers for the self-test exercises as specified on the lab document. Name this document “Lab5SelfTest”







  • The source code for the Bank Account program– Name this file “Lab5Switch.cpp."


  • The source code for the Nested If version of the Bank Account program– Name this file“Lab5NestedIf.cpp."






  • TEST RUN - Copy the test run output from your program and paste in to the bottom of your source code. Make each line a comment so that all you need to do is submit your source code and your output will be at the bottom of your program.




CSC121Module5Fall2021Student/CSC121Module5LabFall2021.docx CSC121 Lab 5: Switch Construct Name Any items that require a written answer should be answered on a separate sheet attached to this document. Part 1 Complete the following Self-Test exercises (each program should allow the user to enter the data being tested as often as the user wishes): · Page 138, # 15 - 19 _______________ In addition to displaying the output, provide a brief explanation as to how the computer arrived at that output. Save this document as Lab5SelfTest. Part 2 Write a C++ program that prompts the user for an Account Number(a whole number). It will then prompt the user for the initial account balance (a double). The user will then enter either w, d, or z to indicate the desire to withdraw an amount from the bank, deposit an amount or end the transactions for that account((accept either uppercase or lowercase). You must use a switch construct to determine the account transaction and a do…while loop to continue processing. Name this program Lab5.cpp. Test Run: Enter the account number: 1 Enter the initial balance: 5000 SAVINGS ACCOUNT TRANSACTION (W)ithdrawal (D)eposit (Z) to end account transaction Enter first letter of transaction type (W, D or Z): w Amount: $1000 Balance for this account is now: $4000.00 SAVINGS ACCOUNT TRANSACTION (W)ithdrawal (D)eposit (Z) to end account transaction Enter first letter of transaction type (W, D or Z): d Amount: $500 Balance for this account is now: $4500.00 SAVINGS ACCOUNT TRANSACTION (W)ithdrawal (D)eposit (Z) to end account transaction Enter first letter of transaction type (W, D or Z): z No more changes. Balance for this account is now: $4500.00 Press any key to continue . . . Part 3 Create a second version of this program that uses nested if statements instead of a Switch construct. Use the Fuel Guage and Tax videos for guidance. Review slides 40 – 44 for additional help. Name this program Lab5NestedIf.cpp.
Oct 08, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here