roman numeral multiplication quiz. when the user clicks next select a number at random between 1 and...
TRANSCRIPT
Roman Numeral Multiplication Quiz
When the user clicks Next
• Select a number at random between 1 and 10.
• Display the corresponding image (Roman1_1.jpg, or Roman1_2.jpg, etc.)
• Select a second number at random between 1 and 10.
• Display the corresponding image (Roman2_1.jpg, or Roman2_2.jpg, etc.)
• Set the image next to the buttons to the “thinking” image.
• Clear the textbox of any previous answer
When the user clicks Check
• The user should enter a guess in the textbox and click Check.
• If the user’s answer is correct, then change the image next to the buttons to one of the happy faces (chosen at random).
• If the user’s answer is incorrect, then change the image next to the buttons to one of the sad faces (chosen at random).
When starting
• Include in the body a call to the Next button’s method, so that a random problem is selected as soon as one navigates to the page.
When in Rome
• Next declare, instantiate and initialize an array like:
• var RomanNumerals = new Array("0", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX", "XXI", "XXII", "XXIII", "XXIV", "XXV");
When in Rome (Cont.)
• Use the array to modify your program so that now the user is expected to enter his or her answer in roman numerals.
• Note that the element with an index of 7 is VII which is the roman numeral for 7.