CS 3121 Final Review Questions
Fall 2009
Revisions:
12/14/09; 12:50pm; Added slight clarification to question 13.
For studying for the final exam, also see the study questions for Exam 1, and Exam 2. The final exam will be cumulative.
Coverage of this study guide:
- PHP & Database access
- Mayer, R. E. & Moreno, R. (1998). Cognitive Theory of Multimedia Learning: Implications for Design Principles.
- Chapter 14 (Chapman & Chapman): Scripting
- Chapter 9-11 (Williams): Typography
- Chapter 9 (Chapman & Chapman): Typography
- Chapter 13 (Chapman & Chapman): Accessiblity
- Chapter 15 (Chapman & Chapman): XML
- Chapter 16 (Chapman & Chapman): Networks
Homework questions due: Wednesday, December 16th, 2009
[15 pts]
Homework is due at the start of class on the due date. Late homeworks will not be accepted. Homeworks must be type-written, and not hand-written. Keep a copy of your homework, and bring this with you the day of the quiz/exam review (i.e., the day the homework is due). This should help you in the review session.
Remember: Some of the questions on the exams will be drawn purely from the textbook, and will not have been covered in the class lectures or class lecture notes. Be sure to read the textbook chapter material and other assigned reading!
For the homework, solve only the following 15 problems (one point each):
3, 4, 5, 12, 21, 22, 25, 26, 27, 30, 33, 38, 39, 47, 48
PHP & Database access
- Semicolons must follow each statement in PHP syntax. True or False (Circle one). Explain.
- Write PHP code that will delete every row from a mySQL table that has keyValue=10. Assume there is a column named "keyValue". Assume a setup similar to the one we have on marengo for mySQL. [[Added on 12/18/09]]. Your program should run in a .php file on marengo when executed from a browser, but assume that the SQL table has been created previously.
- Write PHP code that will generate a list of images in HTML, where the image file names are taken from a table where this table has name "image_table", with columns "imageId" (key for image), and "imageURL" giving the URL for an image. Your list of images in HTML should contain all the images from the table. Assume a setup similar to the one we have on marengo for mySQL. [[Added on 12/18/09]]. Your program should run in a .php file on marengo when executed from a browser, but assume that the SQL table has been created previously.
Mayer, R. E. & Moreno, R. (1998). Cognitive Theory of Multimedia Learning: Implications for Design Principles.
- According to Mayer and Moreno, why is it better to present an explanation in words and pictures than solely in words?
- According to Mayer and Moreno, why is it better to present words as auditory narration rather than as visual on-screen text?
Chapter 14 (Chapman & Chapman): Scripting
- Is JavaScript interpreted or compiled? Explain.
- Why do we say that variables are implicitly typed in
JavaScript? What does this mean?
- What do we mean by dynamic typing of variables in
JavaScript?
- Give a way in which JavaScript can be included (used) in
your
HTML documents other than directly through use of the
<script> </script> tags.
- The "id" attribute of an IMG tag is often used in
JavaScript. Give a concrete example of this JavaScript use of the id attribute.
- Write a JavaScript function, MakeLink (e.g., that will
run in <script> sections of an HTML document), that accepts a
single parameter, X, assumes this variable is, in fact a string giving
a URL for a web site, and outputs an anchor tag dynamically, to the
current HTML document, based on this URL.
- Write a JavaScript function, OutputNumbers, that takes
a single integer input parameter, N, and writes the numbers from 1 to N
out to the HTML document window. Put a "line break" between every 10
numbers, and put a space after every number (Like C and C++, JavaScript
has the mod or modulo operator, "%").
- Write a Javascript function that accepts an array of strings (where each string will be a URL) as its only parameter. The function
outputs each of the URLs to the current document window (as the web page is rendering) as an anchor
tag.
- Assuming that X is a string variable that contains a URL (i.e.,
Internet address) what is the effect of the following JavaScript code?
window.location = X
- What is meant by the phrase event-oriented user interface?
- What is an event handler (or listener)? What is handler registration? Give
a JavaScript example of handler registration, and an event handler.
- What is a blur event? What is a focus event?
- When does the load event occur in HTML/JavaScript? When does
the unload event occur?
- setTimeout and setInterval are methods
(functions) used for time-based event handling. Explain the distinction
between these two methods.
- Give program code to implement an animated cursor in HTML,
JavaScript, and CSS (e.g., an image that moves exactly with the cursor
or mouse motion).
- Write JavaScript and HTML code that will replace a blank image
(specified with an IMG tag in HTML) with a non-blank image after 10
seconds.
- Write JavaScript and HTML code that will replace a blank image
(specified with an IMG tag in HTML) with a non-blank image after 10
seconds in which the mouse is not moved.
- Write JavaScript and HTML code to move an image (specified with
an IMG tag in HTML) from starting coordinates of StartX (column), StartY (row) on the screen to EndX (column), EndY (row) on the screen, in increments of StepSize pixels. The image should move StepSize increments every 50
milliseconds until it reaches the end or goal coordinates.
- Render N images into an HTML document, where these
images have the names Image1.jpg, Image2.jpg, ... ImageN.jpg. Render
them with IMG tag ID's: Image1, Image2, ... ImageN. Every S (e.g., S = 5) seconds, randomly select a pair of images and
swap the images. Use the Math.random function of JavaScript
to select a random number. Assume this function takes a parameter K and returns a random number between 0 and K-1.
Chapter 9-11 (Williams): Typography
- Define concordant, conflicting, and contrasting relationships between typefaces.
- Give the characteristics of typefaces in each of the following typeface categories: Oldstyle, modern, slab serif, sans serif, script, decorative.
- Define the following typeface contrasts: Size, weight, structure (category), form, direction, color.
Chapter 9 (Chapman & Chapman): Typography
- What is a code value or code point in a character set?
- Why is standardization important in character sets?
- ASCII is an 8-bit code. True or False. Explain.
- ASCII is sufficient for representing characters in Japanese, Korean and Chinese. True or False. Explain.
- ISO Latin 1 is the same as ASCII. True or False. Explain.
- An encoding is the same as a character set. True or False. Explain.
- Character sets have glyphs. True or False. Explain.
- Display fonts are typically acceptable for use in the main reading text of a web page or a book.
- What does it mean to say that a font is embedded in an PDF file?
- Outline fonts are scalable. True or False. Explain.
Chapter 13 (Chapman & Chapman): Accessiblity
- Define: Accessibility.
- A web site will have use that is only internal to a small company.
Is accessibility an issue? Explain.
- Give three ways in which HTML can be coded to help a screen reader.
- Accessibility is not just about individual people's physical, mental, or perceptual limitations. Explain.
- Why can it be important to enable access to a web page or other software through keyboard controls?
Chapter 15 (Chapman & Chapman): XML
- Is XML a markup language? Explain.
- XML more clearly illustrates the separation of structure and
appearance of a markup language. Explain.
- What does a DTD (Document Type Definition) provide?
- When does a DTD get used by software? When does an XML-type document get validated?
- Define the part of a DTD for a "note" document element for a MIDI
XML-based language. The note document element should include a (nested)
sub-element called instrument, and the note element should have a
"duration" attribute. The nested "instrument" element should have an
attribute called "type" which indicates the type of musical instrument
(specified by a string).
- In what ways can the appearance of an XML-based markup language
be specified? Be as specific and concrete as you can.
- What is the advantage of using an Xpointer reference to a
document rather than the current HTML fragment identifier?
- Design a replacement file format for the MIDI file format, in XML. Call this format MidiXML. The XML tags for your MidiXML file format should contain information corresponding to the MIDI format, but should be in a readable text format (i.e., the file format should not be binary). Clearly state the meaning of the tags in your new file format.
Chapter 16 (Chapman & Chapman): Networks
- TBA