CCSF Spring 2010 / CNIT 133 Homework 3 - Decision Logic I


Link to... Description
Part 1 This is a webpage that contains a script that inputs a student's homework average and final exam score (both as integers). Calculate the student's final average according to the formula:   final average = .7 * hwAvg + .3 * finalExam
Part 2 This is a webpage that contains a script that inputs one salesperson's items sold for last week, calculates how much the salesperson sold and how much they earned, and then outputs XHTML text that displays this data. Be sure to round the outputted results to 2 decimal places.
Part 3 This is a webpage that contains a script that will determine the gross pay for each of three employees. The company pays "straight time" for the first 40 hours worked by each employee and pays "time and a half" for all hours worked in excess of 40 hours. You are given a list of the employees of the company, the number of hours worked last week and the hourly rate of each employee. Your script should input this information for each employee, determine the employee's gross pay and output XHTML text that displays the employee's gross pay. Be sure to round the outputted results to 2 decimal places.
Part 4 This is a webpage that contains a script that reads in a five-digit integer (not starting with zero) that determines and outputs a message stating whether or not it's a palindrome. If the number is not five digits long, display an alert indicating the problem to the user.


Valid XHTML 1.0 Strict Valid CSS!