Parks Midterm Answers |
1. (50 points) An HTML page is designed to draw the flags of the three Scandinavian countries. The initial page is shown below at the left side. When the page is loaded there is: a form named flagform; a select box named csel, with three options: Denmark; Finland; and Sweden; and a button labelled "GO". The "Finland" option is initial selected. All three flags are formed with two colors: a background color and foreground color that creates a vertical and horizontal cross. The user (1) chooses a Country; and (2) clicks the "GO" button. This event cause a sub named three_flags to be executed.
|
|
Click "VIEW", then "SOURCE" to see the answer code
CAUTION: Some "popup blockers" will prevent the demo from working. Turn it off to see the 3 flags demo
2. (50 points) A famous secret code by Thomas Jefferson Beale used a unique method to encrypt a secret message. The method involved numbering the words to the U.S.A.'s Declaration of Independence. Then he would take each alphabetic letter in the message to be enciphered and substitute the letter with a number that represented a word in the Declaration that began with that same letter. Below is: a textarea named di that contains the entire Declaration of Independence (each word is separated by a comma); a second textarea named secret that contains a secret message (53 integers separated by commas); and an empty textarea named answer.
Declaration of Independence | Secret Message | Answer |
Click "VIEW", then "SOURCE" to see the answer code