Assignment #5 – due Tuesday, May 1, at 11:59 PM Central Time.


As always, I can not emphasize enough the importance of reviewing the material and practicing the concepts BEFORE attempting the homework. If you do so, you will see that the assignment is not all that difficult. If, however, you try to begin the assignment with no or very little practice and review, you may get through it, but it will take you longer, you will make more mistakes, and you will not understand the material as well. Just my $0.02….


1.       Review the miles to kilometers problem we did in class. For this question, you will write a currency converter. You will have a text field where you ask the user to enter a quantity in U.S. Dollars.  Then have 3 buttons, one says: ‘Convert to Euros’, another that says ‘Convert to British Pounds’ and a third that says ‘Convert to Mexican Pesos’.  When the user clicks the button, a function should be invoked that outputs the resulting conversion using a document.write statement.

a.       Use the following conversions:  1 USD = 0.76 Euros, 0.62 British pounds, 13.23 Mexican Pesos

b.      The buttons should have a light gray background and red foreground (or pick your own colors – but all 3 buttons should look the same)

c.       Have some kind of heading section that says:  “Currency Converter” or something similar. Have some kind of image there as well such as a picture of currency symbols, etc.

d.      Have two div sections – one for the header section, and another for the main section. Apply at least two styles to each section – it’s okay if there is some similarity between them such as applying a width style and giving them the same value.

e.      Your document.write statement should be in a complete sentence like this:  For $150 US Dollars, you will get 114 Euros. 

o BONUS: For up to 5 extra bonus points, apply at least one style, and also output the symbol (instead of the word) for Euros/Pounds/Pesos.

f.        Be sure to create a variable to store the US currency and have a second variable to store the foreign currency. Feel free to create other variables as needed, but you should not need to for this assignment.

g.       SUGGESTION: For your own benefit, please do NOT simply copy and paste the code for one of your functions to the other functions. Try to recreate each of the 3 functions by thinking the process through and typing it out. This will really help you practice and review variables, formulast, document.write statements, concatenation, etc. You will need to do some or all of these things on upcoming quizzes from memory anyways, so you might as well get those concepts down now!


2.       Create another pizza ordering page. In it, ask the user for their full name, street address, and phone number. Also have a select box for pizza size where the options are personal ($6), medium ($9), large ($12).  This is very similar to the pizza page you created in A3.  Store all of these into variables. When the user submits the form, output a confirmation using either document.write. The confirmation should thank the user and confirm all the info that they entered. It will be a fairly long document.write statement (lots of plus signs!), so you will probably want to turn word-wrap on within your text editor.  So your output might look something like this:  Thank you Bob Smith! We have your address as 123 Memory Lane, your phone number is 847-333-4444 and you ordered a large pizza.

a.       Again, have at least two div sections, one for the header (title of your company,images if you have one-not requried), etc, and second div section for your main content such as the form. Apply at least one style to each section.



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

·         Also be SURE to include the URLs to all web pages on the server.