200k views
2 votes
Using the Multiple-Alternative IFTHENELSE Control structure write the pseudocode to solve the following problem to prepare a contract labor report for heavy equipment operators: The input will contain the employee name, job performed, hours worked per day, and a code. Journeyman employees have a code of J, apprentices a code of A, and casual labor a code of C. The output consists of the employee name, job performed, hours worked, and calculated pay. Journeyman employees receive $20.00 per hour. Apprentices receive $15.00 per hour. Casual Labor receives $10.00 per hour.

1 Answer

5 votes

Answer:

The pseudo-code to this question can be defined as follows:

Step-by-step explanation:

START //start process

//set all the given value

SET Pay to 0 //use pay variable that sets a value 0

SET Journeyman_Pay_Rate to 20//use Journeyman_Pay_Rate variable to sets the value 20

SET Apprentices_Pay_Rate to 15//use Apprentices_Pay_Rate variable to sets the value 15

SET Casual_Pay_Rate to 10//use Casual_Pay_Rate variable to set the value 10

READ name//input value

READ job//input value

READ hours//input value

READ code//input value

IF code is 'J' THEN//use if to check code is 'j'

COMPUTE pay AS hours * JOURNEYMAN_PAY_RATE//calculate the value

IF code is 'A' THEN//use if to check code is 'A'

COMPUTE pay AS hours * APPRENTICES_PAY_RATE//calculate the value

IF code is 'C' THEN//use if to check code is 'C'

COMPUTE pay AS hours * CASUAL_PAY_RATE//calculate the value

END//end conditions

PRINT name//print value

PRINT job//print value

PRINT code//print value

PRINT Pay//print value

END//end process

User Madura Dissanayake
by
5.0k points