COSC 465 Final Exam
Fall 2013
- Simple, elegant, easily understood answers will receive more credit than long, convoluted answers.
- Good luck!
- 18 points: Fill in the blanks for the following questions:
- _____________________ The object you use in Javascript to perform Ajax requests
- _____________________ The event that gets triggered by Ajax when the server finishes
processing a request (it is fine to give the property name
that you set in a Javascript object)
- _____________________ The scripting language that allows a programmer
to update a web page by modifying the html dom
- _____________________ The scripting language that allows a programmer
to create dynamic web pages on the server side
- _____________________ The two high-level, built-in data structures
provided by most scripting languages.
_____________________
- _____________________ The object model in Javascript is not called
a class-instance model but is instead called what?
- (5 points) In three sentences or less, explain the importance
of AJAX to web scripting (please do not tell me what the acronymn stands
for).
- (15 points): This question has two parts:
- Describe two client-side and two server-side
solutions to keeping session information using PHP, and describe the
advantages of each. Use no more than three sentences for each solution.
- Is it better
to keep session information on the client-side or the server-side?
Why?
- (10 points): Describe what advantage(s) XML has over a database
and what advantage(s) a database has over XML. Use no more than 6
sentences for your answer.
- 10 points Write a Perl regular expression to represent each of the following patterns. Just write the pattern and nothing else. For example, if I told you to write a pattern for a date that has the form mm-dd-yy, with month and day being one or two digits and year being exactly two digits, I would expect your answer to read "\d{1,2}-\d{1,2}-\d{2}".
- A tax rate that should be a decimal number between 0 and 1 that starts with
a period and then has 1-3 digits. For example, .05, .1, and .025 are valid tax
rates but 0.05 is not.
- A string that begins with a sequence of one or
more alphabetic
characters, then an optional character chosen from the set
#!?^, and then ends with a sequence of one or more numbers. For
example, the pattern should
match "bvz64" and "bvz!64" but not "87", "bvz64brad", or "bvz64 fo3".
- (15 points) Show what the following 5-way Btree looks like after
42 is inserted into it. Assume that both leaves and internal nodes can
contain a maximum of 5 values.