
Perfect Student Midterm Exam October 28, 2008
Student ID: 0000 Exam: 9379 CS-081/Vickery Page 1 of 5
NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives
aid on any exam or quiz.
INSTRUCTIONS: For multiple choice questions, circle the letter of the one best choice for each
question. There is no penalty for guessing. For other questions, follow the directions in the
question.
1. We have discussed two kinds of โtreesโ in this course: File System trees where nodes are
directories and files, and Document Object Model (DOM) trees where nodes are elements of an
(X)HTML document. For each of the following items, check the appropriate boxes to indicate
whether the item applies to File System trees, DOM trees, both, or neither.
Item๎File๎System DOM๎
The root element is a directory.
The root element is html.
Each element other than the root is the child of another element.
Child elements can be either files or directories.
The root element must have exactly two children: head and body.
Examples of attributes an element can have are class and id.
The parent of the current node can be referenced as โ..โ
The current node can be referenced as โ.โ
A parent node can have multiple child nodes.
A child node can have multiple parent nodes.
Parent nodes have to be directories.
2. File names are case sensitive.
A. Always
B. Never
C. It depends on the operating system.
3. What would
~student mean in a URL?
A. Display a web page that was not written by a student.
B. The computer that has the web page is named student.
C. The web page is in a directory that belongs to a user named student.
D. The web page contains information about students.
E. There is a mistake: the character ~ cannot appear in a URL.
4. A web site can have more than one file named index.xhtml.
A. True, as long as each one is in a different directory.
B. False, there can be no more than one file with this name in a web site.
C. True, there can be as many files with this name, even if they are in the same directory.
D. False, index.xhtml is not a valid file name.
E. True, but they must all have exactly the same contents.
5. What is special about the file name index.xhtml in a web site?
A. If a URL ends with the name of a directory, the web server will automatically use the file
named index.xhtml in that directory if it exists.
B. It is a special name because it does not matter how it is capitalized, whereas other file names
are case sensitive.
C. It is the only file name that can have four characters after the dot.
D. It lets the browser know that the web page was written by a professional web developer.
E. It proves that the web page has passed the XHTML and CSS validation tests.