Assignment #4

This will be an unusual assignment...  You will be given 3 pages to create from memory.  The good news, is that these pages are almost identical to examples that have been given in lecture. In other words, there is nothing new in this code. Also, as you are working on your pages, you MAY refer to your notes as much as you like.

However, each of the three pages you SUBMIT must have been written 100% from memory, that is, without ever having referred to any notes or other resource. (You are certainly allowed to test the page in your browser as you are working, though). In other words, if you get "most" of the page working, and there is something small that didn't work and you had to go back and look something up, then the page was NOT done from memory. In that case, you must delete the page and start again!

Because these are to be done from memory, you will, of course, be working on the honor system. I hope nobody will abuse my trust, or take advantage of their fellow students!

You may also, of course, view this page. So the only two pages that should be visible when typing a page are:

 The moment you have to look up any other page, document, or papers, it is no longer from memory, and you have to start over!

Page #1 (10)

Create a page that uses a regular script (i.e. not inside a function), that simply outputs your name. In other words, when the page loads, have an alert box pop up that says, "Hello, my name is XXXX."

Page #2 (10)

Create a page with a button that says: Calculate the square root of 100. When the user clicks the button, your button should connect to a function (be sure to give you function a clear name), that outputs the value using the appropriate JavaScript function.

Page #3 (20)

Create a page with a button that says: Convert 100 Kilos to Pounds. When the user clicks the button, your button should connect to a function (be sure to give your function a clear name), that outputs the value using the appropriate JavaScript function. When the user clicks the button, it should output the result in pounds. The conversion is:  1 kilo = 2.2 pounds. So when they click the button, it should output 220 pounds.

Submission Guidelines