/* * PROCEDURE: alarmGoesOff (day,job) -> result * INPUT1 : day is the day of the week * INPUT2 : job is the person's vocation * OUTPUT1 : response is a message (a string) * PURPOSE : Returns a person's response to their alarm clock going off */ define alarmGoesOff(day,job) -> response; if day='Saturday' or day='Sunday' then 'Zzzzz...'->response; elseif job='Student' then if day='Wednesday' then 'Yeah! AI PROGRAMMING!'->response; else 'Zzzzz...'->response; endif; else 'Nnnghhgh! AlriiiiiIIGHT... I am up already!' -> response; endif; enddefine; ;;; test cases alarmGoesOff('Wednesday','Student')=> alarmGoesOff('Saturday','Fireman')=> alarmGoesOff('Monday','Student')=> alarmGoesOff('Wednesday','Lecturer')=>