Web Application

Assignment Description

In this assignment, you will create an interactive web page using JavaScript web scripts. The pages you create will implement a simple “calculator”.

The “calculator” itself is very simple:

  • The Calculator supports add/subtract/multiply/divide
  • The user simply click Numbers and Operators to get expected answer

The “calculator” will be played online. If you’re not clear on how the “calculator” is worked (or of any other detail later on), have a look at an example working calculator.

Be sure to test your (partially completed) calculator regularly: at least after each of these steps.

 

Step 1: The Form (structure)

Create an HTML form that asks the user for clicking number buttons and operator for calculating purpose. It should also have a back button.

The “action” of this form should be the JavaScript program you create in the next step.

 

Part 2: Program Basics

Create a JavaScript web script that reads the input from the form in the previous step. Also the script should clarified the each operator‘s action. Before you can do this ,you will have to use eval() function.

Definition of  eval() function:
The eval() function evaluates or executes an argument.
If the argument is an expression, eval() evaluates the expression. If the argument is one or more JavaScript statements, eval() executes the statements.

 

Notes:

If you use any images or other content from somewhere else for any of your work in this course, you must provide a reference. Anything that isn’t 100 percent your own must be referenced. It doesn’t matter how the referencing is done as long as it is visible somewhere on your web page (not only in an HTML comment). Someone looking at your page should be able to figure out where that content came from. If you don’t create the reference, it is academic dishonesty.

Working Hours

  • Monday9am - 6pm
  • Tuesday9am - 6pm
  • Wednesday9am - 6pm
  • Thursday9am - 6pm
  • Friday9am - 6pm
  • Saturday9am - 6pm
  • Sunday9am - 6pm