• Concepts
• Your Task
• Submission
• Your Marks
• Two Reviews
• Criteria
Concepts
Before starting this assignment you should have completed Workshop 1-7.
In addition to previously covered material, this assignment will test your skill in the following areas.
• Selection
• Iteration
• Expressions
• Writing Functions
• Validation
• Booleans
• String Handling
Top
Validation in Forms
When you are joining a website, making a purchase, enrolling in subjects, etc you will have to interact with HTML forms. These forms generally operate by using javascript. It is typical for the javascript present in the web page to check most of the elements of the form in order to see if the entries are plausible, before submitting the data to a server for further checking and processing. Examples include:-
• Checking to see if your phone number resembles a phone number.
• Checking to see if your zip code or post code resembles a valid zip code or post code.
• Checking to see if your email address resembles a valid email address.
In this assignment you will write a program that will check the information for valid credit card.
Your Task
Refer to Assignment Technical Specification for the tasks you need to complete in the assignment.
Documentation and formatting
• Your functions should have a definition comment.
• Loops and selection statements should have their bodies indented and enclosed in { curly braces }.
• Within the code, blocks of statements should be commented. Do not comment each statement.
• The JavaScript should be ordered with constants first, then variables, then other statements.
• Use a single blank line to separate code blocks, and two or more blank lines to separate functions.
Top
Submission
Do not identify yourself in your source code file. The system will maintain your identity and keep the process of reviewing anonymous.
Upload the this file using the Submission Facility below, then proceed to completing reviews.
Top
This assignment will be marked out of 16 and scaled down to a mark out of 8.
If all criteria are satisfied you will receive 12 marks. If not all criteria are met, part marks may be given. Check your own submission against these criteria before you submit.
Completion of two reviews will earn 4 marks. Where it is obvious that a student has completed a review without examining the necessary file, review marks will be removed.
All submissions and reviews are candidates for random moderation. Where two reviews are conflicting, instructor moderation will be applied.
Top
Two Reviews
For this assignment you will be required to complete reviews of two students' assignments.
You will be asked to consider the criteria below when completing reviews.
Be sure you are accurate in completing your reviews. In your comment at the end of the review, explain exactly what tests were failed.
Take care to offer positive feedback and suggestions for improvement to your peers. They are learning, just as you are. You may describe how your code differed from theirs.