Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In the space below, write the pseudo code for the two modules that support the g

ID: 3830847 • Letter: I

Question

In the space below, write the pseudo code for the two modules 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: 1. The module called paycheckHeader() that has no parameters and outputs the header line. Employee Paycheck 2. The module called calculatePay() that accepts the parameter hoursWorked as input and then computes returns the calculated pay for the employee. The pay of an employee is determined by multiplying the worked by $45.99. main() integer hoursWorked // number of hours worked by employee integer pay // paycheck amount for an employee output "Please enter hours worked" input hoursWorked call paycheckHeader() // outputs required header line pay = calculatePay(hoursWorked) //calculates employee pay output "The employee pay is" + pay end main

Explanation / Answer

PSUDO CODE:

paycheckHeader():
   output "Hours Worked Pay";

calculatePay(hoursWorked):
   pay = 45.99*hoursWorked
   return pay

main()
      
   integer hoursWorked
   integer pay

   output "Please enter hours worked"
   input hoursWorked
   call paycheckHeader()
   pay = calculatePay(hoursWorked)
   output "The employee pay is "+pay
ens main