



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!




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 checksum determine if 5313198NW 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 script that inputs an ISBN and validates it using the checksum. If the number is valid the script should set a variable valid to true, and to false if it is not valid.
Part A (20 marks) A website saves cookies on the user’s computer so that they can be greeted by name when they return. Write a JavaScript program that reads the cookies to determine the user’s surname and sex and greets them appropriately with Mr. or Ms.
e.g. Welcome Mr. Murphy e.g. Welcome Ms. Perez
The surname is stored in a cookie called sname. The cookie called sex holds either “male” or “female”. You may not assume that the cookie is present for every user. If the cookie is not found, the user should be greeted with “Welcome”.
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 what wrote the cookie initially, what other pages (if any) may view a cookie?
Part A (18 marks) MegaCorp uses an 600 x 400 pixel image map called magacorp.jpg for navigation on the main page of its website index.html. The image map has links to the four other pages on the site: news.html , aboutmegacorp.html , products.html , and services.html. Write the html code for index.html.
Part B (7 marks) Outline the main differences between client side image maps and server side image maps.
Part A (15 marks)
Write the HTML required to specify the table illustrated below.
Mary had a Little lamb
Its fleece Was white as snow
She went to Dún Laoghaire
And she went to CIT She
almost
To Cork
Everywhere that Mary went the lamb was sure to go
You may assume that all type is the default font and size. CIT is a link to the CIT homepage. The centered lamb image is 100x100 pixels and is named “lamb.gif”
Part B (10 marks)
Write the HTML required to specify the list illustrated below.