CIT597 Quiz 1
Fall, 2004
Name_________________________________________
  1. (20 points) What HTML tag would you use for:
    a. Inserting a picture: <img> c. Inserting a line break: <br>
    b. Linking to another page: <a>   d. Inserting a multi-line Java program: <pre>

  2. (20 points) Circle T for true, F for false:
    1.     F  A font is legible if it is good for long passages of text.
    2.  T     The use of frames makes it hard to bookmark a particular page.
    3.  T     Every <img> should have an alt tag.
    4.     F  Edge detection is based primarily on color differences.
    5.     F  Dr. Dave recommends the use of a grammar checker.
    6.  T     CSS is used to give related pages a consistent look.
    7.     F  All XML tag names must be lowercase.
    8.  T     All XHTML elements must be closed.
    9.     F  DHCP assigns permanent IP addresses to computers.
    10.     F  Programs that process XML should quit if the XML is invalid.

  3. (16 points) Name these four design principles:

    1. Proximity : Related items should be grouped together.

    2. Alignment : Every item should have a visual connection with some other item.

    3. Repetition : Related items should all have some visual elements in common.

    4. Contrast : Emphasize the difference between different items.

  4. (5 points) Write the regular expression \W\w+\W as a Java String.

         "\\W\\w+\\W"

  5. (20 points) Fill in the blanks (indicate spaces with an underscore):
    String Pattern Matched by Java's find method
    (if more than one match, show the first)
    Sky Captain [a-z]+  "ky"
    CSS and XML ([A-Za-z]+ )+  "CSS_and_"
    CSS and XML ([A-Za-z] +)+  "S_"
    THX1138 [^0-9]+  "THX"
    foo="bar" ("?)[a-z]+\1  "foo"

  6. (5 points) HTTP typically uses port number 80 .

  7. (4 points) IP addresses consist of four numbers, each in the range 0 to 255

  8. (10 points) Distinguish between well-formed XML and valid XML.
         Well-formed XML is syntactically correct;
         Valid XML conforms to a DTD or other schema.