Write a Javascript program to implement an online quiz (10 questions consisting of multiple choices and True/False questions)
ACIS421 – Web-Based Development of Information Systems
Section 001
Assignment 1
Due Date: 11 Oct. 2016 (IN CLASS)
___________________________________________________________________________
Note: Submit both hardcopy (printed format) and softcopy.
1. For hardcopy, you are required to submit program listing, documentation, sample inputs and outputs. Documentation includes program description, function description, variable description and statement description. Inside program description, you need to mention the author name, i.e. your name, and student no.
2. For softcopy, please compress the two program files and send the compressed file to the submission module in UMMoodle. Save the two program files as “bb3xxxx_Question1.html” and “bb3xxxx_Question2.html”. Save your compressed file as “bb3xxxx_Ass1.zip”. Please remember to use student number as part of file names.
Question 1
(40%)
Write a JavaScript program to create a meaningful form (designed by you) that contains the following form elements:
a. text boxes (can be text, textarea or password boxes)
b. selection box(es)
c. check boxes and/or radio boxes
d. date box(es) allowing users to pick up a date(s) from calendar image
e. a submit button
Then, validate each form element to check i) missing input data and ii) the correctness of the input data. Bonus points will be given for i) good validations and ii) good alignment of form elements.
Question 2
(60%)
Write a JavaScript program to implement an online quiz (6 questions consisting of 4 multiple choices and 2 True/False questions). The full mark is 100, in which 18 marks for each MC questions, and 14 marks for each T/F questions. You have to include a question bank of 10 multiple choice questions and 5 True/False questions. So, the quiz questions will be randomly generated from the question bank.
When the page is loaded, a confirm box will be opened to ask the user to confirm whether the user is ready for the quiz (Time: 2 minutes) or not. If ready, it will display the following on screen:
1. the questions mentioned above.
2. the timer counting from 120 (60 seconds * 2) to 0.
If the time expires and the user has not clicked on the submit button, it will display a warning message that the quiz has been expired and then the submit button should be disabled.
There should be a submit button at the end of the quiz to do the following tasks:
1. check if all questions have been answered. If not, offer warning message to user to answer all questions.
2. calculate the marks of the quiz
3. display the marks of the quiz on a new window. In addition, it will display the correct answers for those wrong answers from the user, e.g. Question 1: The answer should be B.
PAGE
1