Second JavaScript Assignment

Problem #1: Take in 4 grades and calulate an average. Then test the average to determine the letter grade (A for 90 and above, B for 80-89, C for 70-79, D for 60-69, F for below 60. Display the numeric grade and the letter grade.

Problem #2: Take in a code for type of employee (S for salaried, H for hourly). Take in rating of E for excellent, G for good, P for pour). Calculate a bonus using the following information. A salaried employee with an excellent rating gets 5000 and a good rating gets 2500. An hourly employee with an excellent rating gets a bonus of 3500 and a good rating gets 1500. An employee with a poor rating gets no bonus.

Problem #3: 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 #4: 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 #5: 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.

Extra credit if you use a flowchart or pseudocode to show the logic.