Assignment #6

Due Tuesday, May 8, at 11:59 PM Central Time.

For both pages in this assignment, you will probably find it useful to create a variable called percentageGrade (for the first page) and totalCost (for the second).

Next, I would suggest reading in all values from the form and storing them in variables.

Then set the value of your grade / cost variable based on the values you read in from the form.

Remember to do ONLY ONE SMALL thing at a time. Test it……  Then move on to the next thing.

Page #1

Suppose you are responsible for assigning percentage grades for a course that has 4 homework assignments worth 50 points each, a midterm out of 100 and a final out of 100.  The percentage score for the course is calculated as:

·         Total homework score (a number out of 200) making up 50% of the course percentage grade.

·         The midterm makes up 20% of the course percentage grade.

·         The final make up 30% of the course percentage grade.

Create a form in which you ask the user to enter their total homework score, their score on the midterm, and their score on the final. When they submit the form, indicate to them their percentage score.

As an example, if they scores 180/200 on their homework, 90/100 on the midterm and 95/100 on the final, you would calculate their percentage grade as:

(180/200*50) + (90/100*20) + (95/100*30) which comes out to 91.5.

Page #2

Feel free to modify your pizza ordering form from one of your previous assignments for this problem.

Have a pizza ordering page in which you ask the user for the size of pizza they would like. You may keep the same options as you had for assignment #5: personal = \$6, medium = \$9, large = \$12.  However, include an additional option for extra large: \$16.  Also have a select box for number of drinks with options for 0, 1, 2, 3, 4.  Each drink costs \$1.  Finally have a select box for number of desserts, also with options between 0 and 4.  Each dessert costs \$3.  When the user submits their order, output the total cost of their order. So if they ordered a large pizza (\$12) plus two drinks (2 * \$1 =  \$2.00) plus two desserts (2*\$2 = \$6.00), you would output their total cost as being \$20. In the output statement, also indicate the time/date of their order. You may use the ‘Date()’ function to do so.  You may output using an alert or document.write.

Bonus up to 5 points: Instead of the complete (and fairly long) date, output only the month (as a number is fine), day (of the month), and time (not including seconds). So your output statement might look something like:  We received your order on 5/3 at 15:32. Your total cost is \$20.

Submission:

·         Don’t forget to meet all requirements such as div sections (have a minimum of 1 per page),  hex codes if using colors, etc, etc. Use the checklist to make sure you haven’t forgotten any.

·         Also remember that while you must use a parse function whenever appropriate, you also must NOT use it when it is not needed. Remember that value that you read in from a from comes in as a String.

·         Zip up all files (html files, images if any, etc) and submit as an attachment to COL.

·         As usual, FTP all files to the server, and include the URLs to those files as a comment on COL.