1550 Example Final Exam Questions

2014 April 5
1550 Example Final Exam Questions
There are course example files on all topics for the final exam. Not all course example links appear on the
resources page. As a consequence you need to look at links on the Class discussion pages, the Javascript
topics page, Document Object Model page, and other course web pages.
Domain Object Model
1.
Given an HTML file describe its Domain Object Model structure.
2.
Be able to use in a Javascript program the following DOM functions:
createElement, createTextNode, innerHtml, childNodes, appendChild, insertBefore, replaceChild,
removeChild, nextSibliing, previousSibling, parentNode, removeAttribute, setAttribute.
HTML and CSS
1.
Given a CSS style sheet explain to which elements in an HTML file each style affects; i.e. what do
the style selectors select.
2.
Describe the CSS box model for styling HTML elements.
3.
Given a diagram of a part of a web page, give correct HTML and CSS text that would render the
contents of the diagram.
4.
Given a CSS style sheet describe how given HTML elements would be rendered.
Regular expression
1.
Given one or more of the following regular expression special characters describe what pattern the
regular expression matches and give an example of a match.
'\', '$', '^', '*', '+', '?', '.', '[adz]' , '[^adz]' , '[a-m]',
'\w', '\W', '\s', '\S', '\d', '\D', '\b', '\B', '\n', '$n',
'(x)', '(?:x)', 'x(?=y)', 'x(?!y)', 'x|y', '{n}', '{n,m}'
2.
Given a regular expression example in the Class 9 and Class 10 course web pages, or a variation
of one of those examples, describe what the program snippet does.
3.
Given a regular expression example in the develop.mozilla,org web page on regular expressions
(see the link in the Class 9 and Class 10 course web pages), or a variation of an example, describe
what the pattern matches, and give an example of a match. Examples are restricted to the special
symbols listed in question 1 in this section.
2014 March 26
1550 Final Exam Questions
Page 2 of 2
Javascript programming
All these and similar questions can be answered by thinking about the items in the Javascript topics page
and the example programs discussed in class.
1.
Given a script describe what it does. For example, what would be written to a web page?
4.
Given a partial script fill in the blanks to accomplish a specified task.
5.
Given a function written with if…else statements, write a corresponding program with a switch
statement, and vice-versa.
6.
Given a function written with one of the looping structures, write the algorithm using one of the
other looping structures.
7.
Write short functions that have parameters and return a result.
Examples of functions that you could be asked to write
Functions that you will be asked to write will be variations of the functions in the course examples.