DISC 3371 Midterm Spring 2003 Parks - Answers |
1. (50 Points) An questionnaire is presented on an HTML page that allows the user to measure their programming aptitude. The exam has ten multiple choice questions about programming. Each of the ten questions has five possible answers. The table below shows on the left side: (a) the beginning portion (the first three questions) and (b) the end of the page (a button, a hidden variable named answers that contains a ten character string that represents the correct answers to the questions and a <form> end tag. Questions 4 through 10 have been omitted for brevity. On the right side of the table is the HTML that generates the exam. Again only (a) the the beginning portion of the HTML (the title, and first three questions) and (b) the button, the hiddden answer object, and the <form> tag are shown). Again questions 4 through 10 have been omitted for brevity.
|
<center><b>Programmer Apptitude Test</b></center> <form name="testform"> <b>1. A conjuction is formed by two Boolean conditions and a...</b><br> 1. <input type="radio" name="q1"> XOR <br> 2. <input type="radio" name="q1"> OR <br> 3. <input type="radio" name="q1"> = <br> 4. <input type="radio" name="q1"> AND <br> 5. <input type="radio" name="q1"> == <br> <b>2. A test of equality for two real numbers ...</b><br> 1. <input type="radio" name="q2">is never true <br> 2. <input type="radio" name="q2">is always true <br> 3. <input type="radio" name="q2">cannot always be made accurately <br> 4. <input type="radio" name="q2">is always accurate <br> 5. <input type="radio" name="q2">generates an error <br> <b>3. An integer divided by an integer produces...</b><br> 1. <input type="radio" name="q3">a real <br> 2. <input type="radio" name="q3">an integer <br> 3. <input type="radio" name="q3">a character <br> 4. <input type="radio" name="q3">unpredictable results <br> 5. <input type="radio" name="q3">causes an error <br> . . next seven questions are similar<br> . <p> <input type="button" value="Grade My Exam" onClick="grade_it()"> <Input type="hidden" name="answers" value="4321542314"> </form> |
| For example, the fourth element of digits (i.e., digits(3)) is where the number 3's representation is stored. The string for 3 would be:
|
|
Click "VIEW", the "SOURCE" to see the answer to this question