In the space below, write the pseudo code for the two moules that support the gi
ID: 3772826 • Letter: I
Question
In the space below, write the pseudo code for the two moules that support the given main program. The program calculates and displays the paycheck amount for an employee. The program prompts the user for the number of hours worked and then calculates and displays the pay. The two modules you must code include: The module called paycheckHeader() that has no parameters and outputs the header line: Employee Paycheck The module called calculatePay() that accepts the parameter hoursWorked as input and then computes and returns the calculated pay for the employee. The pay of an employee is determined by multiplying the hour worked by $45.99.Explanation / Answer
1. Pseudocode of paycheckHeader function
function paycheckHeader ()
display "Employee Paycheck"
end function
2. Pseudocode of calculatePay function
function calculatePay(integer hoursWorked)
double PAY_RATE=45.99
double pay=hoursWorked * PAY_RATE
return pay
end function
---------------------------------------------------------------------------
Total pseudo code of the employee pay check
main()
integer hoursWorked
integer pay
output "Please enter hours worked"
input hoursWorked
call paycheckHeader()
pay=calculatePay(hoursWorked)
output "The employee pay is "+pay
end main
function paycheckHeader ()
display "Employee Paycheck"
end function
function calculatePay(integer hoursWorked)
double PAY_RATE=45.99
double pay=hoursWorked * PAY_RATE
return pay
end function