UMass Lowell Dept. of Computer Science

91.461 GUI Programming I

Fall 2015 Semester, Section 201

Prof. Jesse M. Heines

Assignment No. 6

Creating an Interactive Dynamic Table

Date Due:  Tuesday, October 20, 2015


Contents     Top


What This Assignment Is About     Top

This is the first assignment in which you must use JavaScript that you write yourself.  The next assignment will build off this one, so it is important that you write your code clearly in this one so that you can modify it for the next one.  The task itself is straightforward, but it has a lot of parts.  You will need to familiariarize yourself with a number of techniques needed to build this program and the debugging facilities available in you browser of choice.

For this assignment you will create a table completely dynamically based on parameters entered in an HTML form.  First, you must create a a form that accepts the starting and ending numbers for both the horizontal (multiplier) and vertical (multiplicand) axes of a multiplication table.  Second, you will use the numbers entered into the form to create a mulitplication table completely dynamically.  What you will create is commonly called a “single page web app” (or application).

Here’s what a reasonable multiplication table looks like.

 12345
5510152025
6612182430
7714212835
8816243240

Note that the numbers that go along the side of the table and those that go along the top (the multiplier and the multiplicand) are arbitrary.  The point of this assignment is for you to create a program that can display the table given any arbitrary starting and ending numbers for the multiplier and multiplicand.  The human factors part of this assignment is that there are many interesting things that can happen when users enter the four numbers, and we will discuss those in class.


What You Are To Do     Top

  1. Do all the background work to prepare yourself for this assignment.
  2. Begin your by creating a form that asks the user to enter four numbers.  Format your form nicely using CSS and other techniques that we have studied and will discuss in class.
     
  3. Next, add JavaScript code to read those four numbers when the Submit button is pressed (clicked).  Print them out using the browser console or by just inserting them into a reserved space on your page to ensure that you are reading the numbers correctly.
     
  4. Now use the numbers read from your form to generate your multiplication table and place it on your page at the desired location.  Initially, assume that the four numbers are all valid.  You will deal with errors in the next step.
     
  5. Once you have your basic table-generation code working properly and displaying the table using the user’s entered values, anticipate all the errors that users might make in their input and decide how you’re going to handle these.  This is a critical component of any dynamic web page that depends on data entered by a user, and we will discuss different ways to handle such errors in class.
     
  6. Test your page thoroughly.  Your table must still display correctly when you change the parameters.  This is what we will do when we grade your program, so it behooves you to do it yourself and correct any problems before submitting your program for grading.
     
  7. Use CSS to style the table in an appropriate way.  (The style used above is of course only one way to do this.)  We certainly encourage you to be creative. 
  8. Hint:  The :nth-child() and other CSS3 pseudo-classes are particularly useful for styling the top row and the left column.  These are covered in our textbook on pages 439-441 of the 2nd edition of the CSS textbook, but have been moved up to pages 74-78 in the 3rd edition.  In addition, there are some very helpful examples of the :nth-child() pseudo class at css-tricks.com/useful-nth-child-recipies.  There is also a good reference on all the CSS3 pseudo-classes at reference.sitepoint.com/css/css3psuedoclasses.

  9. Once you have everything working on your local system, upload your application to GitHub.  Submit your assignment by submitting the GitHub URL where your application resides.  That URL will be of the form: 

    http://yourusername.github.io/repositoryname/filename.ext

One further note:  It is worth repeating that you will use the code you write for this assignment in the next one, so we encourage you to do this one carefully.


Submitting Your Assignment for Grading     Top

As always, submit your assignment using the Assignment Submission Form.  This form will lead you through providing all the information we need to evaluate your work, confirming that it is correct, and then e-mailing that information to our teaching assistant and me with a copy to yourself.  Be sure to select 91.461 Assignment No. 6: Creating an Interactive Dynamic Table from the assignment drop-down list on that form.

Important Note:  If you do not receive an e-mail in your CS account within a few minutes confirming that your assignment has been submitted, something has gone wrong.  Try submitting again or contact me.


How You Will Be Graded     Top

This assignment will be graded on a 20-point system with points awarded as follows.  Please note that the lists of features provided below are not meant to be exhaustive.  They are merely representative of the types of things we are looking for in each grading category.  As always, 20% of your grade is for documentation.

Criteria  (numbers in parentheses are the points that can be earned for that bullet item) Possible
Points

Program Integrity / Design

  • (4) multiplier and multiplicand ranges are read from a form
  • (4) errors in data entry are handled gracefully
  • (4) parameters entered into the form are used to set the table parameters and the table is generated dynamically with the correct results
  • (2) table is reasonably styled
  • (2) entire single page web app is displayed from github.io

16

Source Code Documentation and Formatting

  • (1) user name and pertinent contact information appear in all source files
  • (1) all files contain adequate explanatory documentation that is meaningful and does not merely echo code
  • (1) all files are properly indented and formatted with adequate white space for readability
  • (1) any sources used are cited in comments embedded within code

4




This is document http://jesseheines.com:8080/~heines/91.461/91.461-2015-16f/461-assn/CreatingADynamicTable-v04.jsp.  It was last modified on Friday, August 26, 2022 at 4:09 PM.
Copyright © 2022 by Jesse M. Heines.  All rights reserved.  May be freely copied or excerpted for educational purposes with credit to the author.