CISC Homework H03

Introduction

In this assignment, use regular expressions to validate your input in the form and use math to format your output on the web application.

You have already converted your currency to ten different other possible currencies, but the format still looks a little funny. You might have too many decimals if you are converting to or from USD, or your output may be incorrectly formated (e.g. "$1.3USD" is the same numerical value as "$1.30USD," but it doesn't look the same when output as a String.

Overview

In this assignment, you will:

Step-by-Step Instructions

Step 1: Reading

Even More Reading.... Get familiar with regular expressions and brush up on shifting decimals.

Step 2: Review and study the holes in the code to get familair for what the assignment is asking you to do.

Pay special attention to the converter.js file and how the code calls the initializing functions.

Step 3: Proceed with filling in the JavaScript code in the converter.js file marked by the indicators below

*1*

Step 4: Proceed with filling in the JavaScript in the validation() function

*2* — Use regular expression to validate the user input for your given currency. Return true if the regular expression and matches the input and false otherwise.

Grading Rubric (65 pts total)

Item Description Points
Correct regular expression validation Refer to above references for specifications 20
Correct output for your currency Use if statements and correct math logic 20
JavaScript code Your Java code works and is well commented and structured 15
Scripting and Submitting You followed instructions for scripting and submitting 10
TOTAL POINTS    

Due Date: TBA


Valid XHTML 1.0 Valid CSS!