



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




(NFQ Level 8)
Instructions Answer FOUR questions All questions carry equal marks.
Examiners: Dr. J. Buckley Dr. A. Kinsella Mr. C.E. Manning
Q1. (25 marks) Part A (8 marks) Using the cheksum for Republic of Ireland PPS numbers determine if 5313299P is a valid PPS number. [You must show your work. No marks for a simple yes or no]
Part B (17 marks) Write a JavaScript program that inputs a PPS number and validates it using the checksum. If the number is valid the script should set a variable valid to true, and false if it is not valid.
Q2. (25 marks)
Part A (20 marks) A website has already saved cookies on the user’s computer that indicate the user’s name and age. These cookies are name and age. Gatekeeper.html is a web page that provides a link to a game only if the user is 16 years or older. If the user is old enough the page displays a link to www. violentgames .com otherwise the page displays a message that includes the users name.
e.g. I’m sorry Dan you are not older enough to play these games
Write the HTML code and JavaScript for gatekeeper.html. You may assume that the relevant cookies are present for every user.
Part B (5 marks) For security and privacy reasons cookies are not generally available to every server that requests to see them. Apart from the page that wrote the cookie initially, what other pages (if any) may view a cookie?
Q4. (25 marks)
Part A (18 marks) The image iberia.jpg is 500 x 500 pixels. It is used in conjunction with an image map in a web
page to link to seven other HTML pages based on where the user clicks. If the user clicks on Spain
then the browser is directed to spain.html. If the user clicks on France the browser is directed to
france.html. If the user clicks on Algeria the browser is directed to algeria.html and so on for
morocco.html , portugal.html , and gibraltar.html. If the user clicks on a body of water, the
browser should go to (^) sea.html
Part A: write the html for the page that includes the image and imagemap.
Part B (7 marks) Outline the main differences between client side image maps and server side image maps.
Q5. (25 marks)
The Citese language has only 12 symbols. These are listed below along with the frequency with which they occur in written Citese.
Using Huffman’s algorithm, devise a variable length coding system for Citese that minimises the length of Citese documents.
Symbol Frequency Symbol Frequency A .3 O. B .01 I. C .01 U. D .02 T. E .4 N. F .01 R.