CSCI351: Internet Programming

Midterm Exam I.    Due: Thu, Mar 5

Please submit your work before 11:59pm of the day above.

The tasks have to be done strictly individually.
You are not allowed to discuss the problems with anybody.
Your design must be correctly displayed by the Firefox browser.

  1. (15+18=33 points)   Your task is to achieve the following effect: the webpage originally contains a 3x3 empty table with 3 columns numbered 1, 2, 3 and 3 rows numbered 1, 2, 3. Each table cell has to have the same width and height of 50 pixels, see the left figure below.

    Clicking on the table cell that is at the intersection of column i and row j should lead to appearing the value of the sum i+j in the center of this cell. This should work by clicking on any cell point for every cell. See an example (the right picture) of the number to be displayed for i=2 and j=3.

    1. describe 3 different approaches to achieve this effect; use only the material covered in the first part of the course.
    2. implement one of these approaches.

    Name the source file ex1_1.html.

  2. (17+17=34 points)   Write HTML to produce the following tables; use no images.

    Your design should satisfy the following claims:

    Put both tables in one file and make sure that they appear at one horizontal level exactly as it is shown above. Make sure to provide the table captions. Your design does not need to validate by the W3C HTML validator.

    Name the source file ex1_2.html

  3. (33 points)  

    Design a merge of two XML documents. One document with the root element <Patiens> stores information on patients enrolled in some clinical studies. The other one with the root element <Study> contains information about these studies. The documents have to have the elements shown below. The optional elements are indicated by dotted lines.

    The PI element shown at the bottom is a plain text related to some Patient Information.

    Your design should consist of a single XML document containing the DTD. The document must validate with the XML validator. Separate the documents by using namespaces. Put some data on one patient and style the document for displaying on your taste.

    Name the source file ex1_3.xml