JavaScript Assignment #1
Problem #1: Copy and paste the code in this link and complete the program.
invenprob.txt
The directions are listed as comments in the program. Note that you should change the extention to .html when
you save it.
Problem #2: Write an HTML5 file with JavaScript that takes in the price
of 3 books and then calculates the average price and writes it on the
screen.
Problem #3: You are going to modify problem #2, but you need to then save it under a
different name. The modification is adding an if statement. You are
going to test and see if the average price you calculated is greater than
100. If it is, you want to write out the average and the message too expensive.
Otherwise you want to write out the average and a message that says OK.
Problem 4: Take in the student name, major and gpa. If the person has a major
of CI and a gpa > 3.6 write the students name and CI honors. If the criteria is not met,
write the students name and not CI honors.
Problem #5: Take in a students major. If the major is CI or BU or OF write
the students name. major and Division III. Otherwise write the students name
and not Division III.
Problem #6: Take in a students name, number of credits and major.
Write the JavaScript that will write the students name and the following:
If the student has a major of CI and there number of credits is
greater than 50, write eligible for graduation. If the major is CI but the number
of credits is not greater than 50 write the message not eligible. If the
major is not CI write the message not a CI major.