A program requires an if statement that tests whether an employee's hireType is either "hourly" or " part-time". Write this if statement in our author's pseudocode, applying the appropriate logical operator, and given the information that there are more part-time employees than hourly ones.
// Pseudocode to check the hireType of an employee
// Assuming that there is an employee class with data field hireType and function getHireType() that returns the employee's hireType "hourly" or " part-time"
// Let emp be an instance of employee class
// check if employee's hireType is hourly , then
perform the steps needed for hourly employees
if emp.getHireType() == "hourly" then
print "Hourly";
// do the operation required if the employee is
hourly
else // if employee hireType is "part-time", then perform the steps
needed for part-time employees
print "Part-time";
// do the operation required if the employee is
hourly
end if;
Get Answers For Free
Most questions answered within 1 hours.