Exam 2 Topics
Exam 2 will take place on Wednesday, 10 December 2008, 6:00 PM - 8:30 PM in Williams 202.
The exam is open book. You may bring any of the required course textbooks, copies of powerpoint
slides, and one page (8.5" X 11") of notes. You may not use the computer or any computer programs.
This exam will cover both Javascript and PHP. The javaScript questions will be from
chapters 9-10 in the Gosselin JavaScript book. The PHP questions will be from the first 7 Chapters
in the PHP book. The specific topics to be covered are listed below. Of course, all programming
knowledge builds on previous knowledge, so although earlier JavaScript chapters are not explicitly
addressed, you will be expected to use the concepts from those chapters in your solutions. You
will, for example, be expected to know how to use arrays, the Math object, string objects, etc.
- Managing State (Chapter 9)
- Be able to save state information using hidden fields and query string.
- Be able to manipulate strings. It is especially
important to be able to create and parse cookie information.
- Know how to save and retrieve cookies.
- Know how to set the life time of cookies using the Expires attribute.
Be able to use the Date object to set this attribute.
- You are not responsible for the security issues in chapter 8.
- Dynamic HTML and Animation (Chapter 10)
- Know what the document object model (DOM) is.
The DOM model specifies the objects (such as the document object, the form
object, the image object, etc.) and their properties.
- Know how to use document object methods to create new web pages and documents.
This includes the close(), open(), write(), and writeln() methods.
- Know how to use JavaScript to change tag formats and positioning in W3C DOM
compliant browsers.
- Be able to use getElementByID(D) and getElementsByTagName(tabName) methods).
- Know how to create pop-up and sliding menus.
- PHP (Gosselin book app. B and PHP book chapters 1-2 + slides)
- Know the concepts behind client computers and server computers on
the web.
- Know the components of a PHP script.
- Be able to create a hyperlink to a PHP cgi script in a html document.
- Be able to pass information to a PHP cgi script by appending the
information to the URL (query string).
- Be able to pass information to a PHP cgi script from forms using
either Post or Get. (lecture 4 slides: forms)
- Be able to get information from a html document by using the $_POST or
$_GET functions. (lecture 4 slides: forms)
- Be able to pass information from forms. (lecture 4 slides: forms)
- Be able to do simple arithmetic with variables. (lecture 2 slides: control)
- Be able to improve the appearance of numbers on a web page using
formated sprintf statements. (lecture 4 slides; see slides 19 and 21)
- Be able to create variables, arrays, and hashes. (lecture 3 slides: functions & arrays)
- Be able to use for and foreach statements to iterate through arrays
and hashes. (lecture 2 adn 3 slides)
- Be able to create a web page using the print or echo functions. (lecture 1 slides)
- Be able to open files for reading and writing. (lecture 5 slides: Files)
- Be able to write records to a file using the fwrite function. (lecture 5 slides: Files)
- Be able to read records from a file into variables.
(lecture 5 slides: Files)
- Be able to use the explode function to extract data from
arrays and implode to put data back into arrays. (lecture 5 slides: Files)
- Be able to use if, if-elseand else-if statements, comparison
operators, and logical operators (and, or). (lecture 2 slides: control)
- Be able to use associative arrays (lecture 3 slides: functions & arrays).
- Be able to write user-defined functions (lecture 3 slides: functions & arrays)
- Be able to pass parameters to user-defined functions (lecture 3 slides: functions & arrays)
- Be able to use while statements (lecture 2 slides: control)
- Know how to create and modify databases in mysql (lecture 7 slides: using DB).
- Be able to use php to access and modify databases (lecture 8 slides: php & DB).
Databases (slides)
- Know how to construct efficient tables (Intro to Databases & PHP slides)
- Be able to write queries (both simple and complex) using SQL (Intro to SQL slides)
- Be able to create tables and insert records into a mysql database
(Intro to SQL slies)