JavaScript Assignment #1

You need to write the pseudocode or draw the flowchart for the problems you need to solve. Pass in the pseudocode or flowchart along with the JavaScript that I can run.

Problem #1: Take in the height, width and length of a box and determine the volume. (remember volume is height times width times length). Display the result. If the volume is greater than 100 display the message that says extra fee otherwise display the message that says ok.

Problem #2: You need to take in the price of four non-taxable items a customer has bought and determine the total price. Then take in the amount the customer gave at the cash register to pay for the items and determine how much change the customer should receive.

Problem #3: Take in the inches of snow from three storms. Calculate the total amount of snow that fell and the average snow fall and display both results.

Problem #4: You need to take in the price of three items a customer bought, determine the total price before tax, determine the tax using the tax rate of 5.5% and then determine the total price after taxes. The output should show the total price before tax, the tax and the total price after taxes. Identify what each result you show is - for example display the words the total price before tax and then display the result of that calculation.

Problem #5: You need to calculate an employees pay. To do this you will need to take in the following four inputs:
  1. the number of hours the employee worked
  2. the number of hours the employee is contracted to work before the employee receives overtime (for example, the employee might be contracted to work 40 hours and only receives overtime for hours over 40)
  3. the pay per hour
  4. the rule for calculating over time (time and one half would be 1.5 while double time would be 2).
You should ask a question to determine if the employee worked over their contracted hours and then calculate the appropriate pay. (Clarification: you want to ask if hours worked is greater than contracted hours). Test this problem with information about an employee who did not work over their contracted hours and again for an employee who did work over their contracted hours. See if they both work.