Question: Rewrite the highlighted section to correct the errors in the placement of the methods. Hint: Read the implementation (detail steps) for each method to help

Rewrite the highlighted section to correct the errors in the placement of the methods.

Hint: Read the implementation (detail steps) for each method to help you determine which methods should not be within the while statement and the correct placement of the misplaced modules.

start

Declarations

string name

string EOFNAME = "ZZZZ"

while name not equal to EOFNAME

housekeeping()

mainLoop()

finish()

endwhile

stop

housekeeping()

output "Enter first name or ", EOFNAME, " to quit "

input name

return

mainLoop()

Declarations

num hours

num rate

num DEDUCTION = 45

num gross

num net

output "Enter hours worked for ", name

input hours

output "Enter hourly rate for ", name

input rate

gross = hours * rate

net = gross - DEDUCTION

if net > 0 then

output "Net pay for ", name, " is ", net

else

output "Deductions not covered. Net is 0."

endif

output "Enter next name or ", EOFNAME, " to quit "

input name

return

finish()

output "End of job"

return

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!