COSC 465 Final Exam

Fall 2013

  1. Simple, elegant, easily understood answers will receive more credit than long, convoluted answers.
  2. Good luck!

  1. 18 points: Fill in the blanks for the following questions:

  2. (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).

  3. (15 points): This question has two parts:

    1. 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.

    2. Is it better to keep session information on the client-side or the server-side? Why?

  4. (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.

  5. 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}".
    1. 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.
    2. 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".
  6. (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.