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 code.
Problem #1: Take in four grades and determine and display the average.
Problem #2: Take in the total amount of a donation you pledged and the number of
payments that you plan to make and determine the amount of each payment. Say if you
pledge 100 and say you are making 4 payments that means 25 dollars per payment.
Display the amount of the payment.
Problem #3: 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.
Problem #4: You need to calculate your grade. Take in the homework grade, the responsibility grade and the final grade.
The homework is 75% of your final grade, the responsibility is 10% of your final grade and the final is also 15% of
your final grade. Calculate and display the average
Problem #5: You need to calculate an employees pay. To do this you will need to take in the following four inputs:
- the number of hours the employee worked
- 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)
- the pay per hour
- 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. 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.