Project 4

Due: Friday, May 3rd at 11:00 PM
Objective

The goal of this project is to practice JavaScript arrays and forms.

Overview

Below are descriptions for each of the pages you will create. For this project, you will implement a set programs that will allow you to practice arrays and forms. Please read descriptions carefully and capture every detail. Since coding is very detail-oriented, part of your grade will depend on how carefully you follow these instructions.

Implementation

You will create the following HTML/JS pages. Further details on each page will be given below.


1) Prog1.html

In a file named Prog1.html, implement a program with the following specifications:

  1. Define the bolded text "StartRange" followed by a textfield.
  2. Define the bolded text "EndRange" followed by a textfield.
  3. A button labeled "Print Table".
When the button is selected, the program will display a table of powers of 2 and 3, for the numbers in the range defined by the start range and end range values provided via the textfields. The first column will have the number, the second column will have the power of 2 of that number, and the third column the power of 3. Display the table in a display area using <div> </div> tags as shown in class.

Requirements:

Updates:


2) Prog2.html

In a file named Prog2.html, implement the following functions:

Using the above functions, implement a program that displays a form that has a textfield and two buttons. Users will provide numbers in the textfield, where each number is separated by commas. One button (labeled "isPalindrome") will display the message "palindrome" if the sequence of numbers provided represents a palindrome and "not a palindrome" otherwise. A similar button (labeled "isIncreasing") will display the message "increasing" if the numbers represent an increasing sequence and "not increasing" otherwise. Display the message using <div> </div> tags as shown in class.

Requirements:

Updates:


3) Prog3.html
In a file named Prog3.html, implement a program with the following specifications:
  1. Define an area where a picture will be displayed.
  2. Define three buttons labeled "FirstPhoto", "NextPhoto", and "PreviousPhoto".
  3. Create a folder called "Photos" within the Project 4 folder and include five pictures you like.
  4. Define an array with the names of the five pictures.
  5. Selecting the "FirstPhoto" button will display the first photo in the array.
  6. Selecting the "NextPhoto" button will display the next photo in the array. If the last photo is being displayed, the first one will be displayed.
  7. Selecting the "PreviousPhoto" button will display the previous photo in the array. If the first photo is being displayed, the last one will be displayed.
  8. Use bootstrap for the page appearance (use the lecture code we posted).
Requirements:

Updates:


Additional Requirements
Project Submission

You will submit a zip file. Please be sure that all of your work (your HTML files and any other necessary files) are in a folder called "Project4". Create a zip file that includes this folder, as follows. On Windows, right-click the folder, then choose "send to, compressed (zipped) folder". DO NOT USE A UTILITY LIKE 7-ZIP OR WINRAR. On a Mac, right-click the folder, then choose "Compress yourFolderName".

You will not receive credit for submitting a file that is not a standard "zip" file. In particular, "rar" files or "7z" files will not be graded. Submit the zip file to the submit server by logging in, selecting Project 4 (Arrays and Forms), and uploading the zip file to the server. You may submit as many times as you like. We will only grade the last submission. See syllabus for late policy.

After you have submitted the project, we strongly recommend downloading your submission from the submit server. It will give you a zip file. Unzip this file and verify that the contents are as they should be. It should contain all of your HTML files and your photo.

Credit

Project adapted from Nelson Padua-Perez and Fawzi Emad.

Web Accessibility