Second JavaScript Assignment

Problem #1: Write HTML code with JavaScript to loop through the hours worked for five days of the week. Within the loop you should have a prompt to take in the hours for a day and add it to the total you are acccumulating. After the loop is done you should check the hours. If the hours are over 40 put out a message that says Overtime hours must be calculated otherwise put out a message saying OK. You should also display the total hours.

Problem #2: Write code that takes in orders for a particular product. You need to take in a reorder point outside a loop. Then within the loop you prompt for the number ordered and add it to a total. When the total is bigger than the reorder point the loop should end and you should display both the reorder point and the order total.

Problem #3: Write a program with a loop. After the loop has been executed the program should ask the user whether they want to do the processing in the loop again and act accordingly.

Problem #4: There are 4 exams for the course you are taking. Enter the 4 grades using 4 prompts. The first exam has a weight of 20%, the second exam has a weight of 25%, the third exam has a weight of 30% and the fourth exam has a weight of 25%. Calulate the average for the exams.

Problem #5: Using a loop take in the four exam grades one per pass through the loop. Each grade has the same weight. Calculate the average and then determine the letter grade. Display both. Then ask the user if they want to enter another set of grades, Y or N and process according to their answer.