Here are the 5 questions:
1. Simulate the execution of this algorithm, assuming the following values are read as input for the first four variables named.
name Mrs. Blue Rain
qty 10 pairs
price $1000 per pair
What values should the computer provide as output?
2. The computer is to read values for regular hours, overtime hours, and hourly wage rate for one employee from an employee time sheet. Payment for regular hours is to be computed as rate times hours. Payment for overtime hours is to be computed at time and a half, or 1.5 times rate times hours. The computer is to compute and output the total pay for the employee for the week. Construct a program flowchart for this application.
3. Draw a program flowchart for a program that will accept one number as input. Assume this number represents some amount of yards. Compute the corresponding values of feet and inches, and output all three values - that is, yards, feet, and inches.
4. Write a program flowchart and corresponding pseudo code to prepare a tuition bill. The input will contain the student name, social security number, and total number of credits for which the student has enrolled. The bill will contain the student name, social security number, and computed tuition. Total credits of 10 or more indicate that the student is full-time. Full-time students pay a flat rate of $1000.00 for tuition. Total credits of less than 10 indicate that the student is part-time. Part-time students pay $100.00 per credit for tuition.
5. Write a partial flowchart (show nested logic only) and partial pseudo code (show corresponding code for partial flowchart) for the following scenario:
a. An ATM machine provides the User with the following options:-
- If transaction code is "D" then the Deposit process is done
- if transaction code is "W" then the Withdrawal process is done
- if transaction code is "B" then the Balance process is done
- and if the transaction code is "E" then the Exit process is done
Any other option would result is an error code/message at the screen.
Use a nested IFTHENELSE control structure only.
b. Reconsider the example above and create a partial flowchart and pseudo code using the CASE Control Structure.
c. Which Control Structure do you think is more effective and why?© BrainMass Inc. brainmass.com June 3, 2020, 7:15 pm ad1c9bdddf