cse-110-homework-4

# cse-110-homework-4 - a a a(2 points 3 Translate the...

This preview shows pages 1–2. Sign up to view the full content.

Name: Student ID # CSE 110 Homework 4 Due: Friday, December 3, at the beginning of class, on paper. This assignment is worth a total of 12 points. You must show all work in order to receive any credit for your solutions. 1. Complete the computeSalary() method below, which calculates and returns an employee's weekly pay based on the rules below. (2 points) a. The normal pay rate for an employee is \$8.00 per hour. b. Employees are paid at their normal rate up to and including 40 hours. c. Hours past 40 but below 50 are paid at 150% of the normal rate. d. Hours past 50 are paid at 200% of the normal rate. double computeSalary (int hours) { } 2. Consider the grammar S ( L ) S a L L , S L S Draw a parse tree for the sentence (

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.