

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Spring 2007
Due: Mon. Feb 12 at 4:00 pm For this assignment you will create a web page with an embedded JavaScript program. You will store this program as an HTML file in your UNC web space, and you will give it an 8-character or more filename that only you know. Then we can retrieve, run, and grade it by pointing our browser www.unc.edu/~ yourOnyen/yourSecretName.html but no one else can see it.
Use a simple text editor to create this program. Do not use Web generation tools. You program will be somewhat similar to the conversion example we did in class. Your program, however, will allow the user to select from 4 different conversions. When it first runs, the program will ask the user to enter a number 0 to 4. Then it will perform these conversions based on that input:
This assignment will require to use a loop, conditional statements (if then else), input (prompt), output (alert), assignment statements, and constants.
Here is a basic “algorithm” (recipe for the computation): // define conversion constants // declare the variables you need // make a main loop // first get input item (prompt), tells what conversion to do // if this item is 0, stop // if this item is not 0, then we need to do the work // get more input (prompt)… get the number to convert // apply the proper conversion factor to the number // print the result (alert) // end of loop
A paper copy of your HTML/JavaScript file, due at the Sitterson front desk by 4:00pm on Sept. 18. Paper should be 8 ½ by 11 inches, stapled and not folded. Be sure your ONYEN and your secret filename are clearly written at the top of the paper. A stapler will be available at the front desk. If you turn in something larger than this, I reserve the right to trim it to 8 ½ by 11 and grade what’s left. You should also have the electronic copy in place by then. We will check for your pages that afternoon.
**Put this header at the TOP of your HTML file. We must have a standard format and location in order to sort out this large class.