Js-A.m.a502 (Quiz App)
Js-A.m.a502 (Quiz App)
T ra in in g As s ig n men t
Version 1.1
Hanoi, mm/yyyy
Training Assignments Front-end Advanced Issue/Revision: x/y
RECORD OF CHANGES
Contents
Day 5-6. Unit 3: OOP and Prototype ..................................................................................................................4
Objectives ...................................................................................................................................................4
Specification ...............................................................................................................................................4
Follow up: ...................................................................................................................................................6
Hints: .......................................................................................................... Error! Bookmark not defined.
If current question is from 2 to 20, then Previous Question must be show. Click on that button will show
previous question.
If you are at last question (Question number 20), you must show Submit Quiz button, and hide Next
Question (there is no more next question). If user click on this button, you must show his/her total score
below the Button Group
28. answers: {
29. a: 'getIndex()',
30. b: 'location()',
31. c: 'indexOf()',
32. d: 'getLocation()'
33. },
34. multi: false,
35. correctAnswer: 'c'
36. },
37. {
38. question: 'Which one of the following is valid data type of JavaScript',
39. answers: {
40. a: 'number',
41. b: 'void',
42. c: 'boolean',
43. d: 'nothing'
44. },
45. multi: false,
46. correctAnswer: 'c'
47. }
48. ];
Problem 01:
Using your understand of OOP (and `this` keyword) fix the problem when user click on Previous button,
Next button, Submit button
Problem 02:
Now you have to extends the apps to support Multiple Choice Question (in HTML it’s a checkbox instead of
radion). Implement the MultiChoiceQuestion class to fulfil the requirement.