Docsity

HTML - Internet Studies and Web Design - Past Exam, Exams of Computer Science

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Science in Computing – Stage 2 (Full-time and ACCS)
(KCOMP_7_Y2)(KCOME_7_Y2)
Autumn 2008
Internet Studies & Web Design
(Time: 3 Hours)
Instructions
Answer Question 1 AND THREE OTHER
questions
All questions carry equal marks.
Examiners: Mr. C.E. Manning
Ms. M. Meagher
Ms. A. Brown
Q1. (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 old enough to play these games
Write the HTML code and JavaScript for gatekeeper.html. You may assume that relevant the
cookies are already 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 which wrote the cookie initially, what other pages (if any) may view a
cookie?
pf3
pf4
pf5

Partial preview of the text

Download HTML - Internet Studies and Web Design - Past Exam and more Exams Computer Science in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science in Computing – Stage 2 (Full-time and ACCS)

(KCOMP_7_Y2)(KCOME_7_Y2)

Autumn 2008

Internet Studies & Web Design

(Time: 3 Hours)

Instructions Answer Question 1 AND THREE OTHER questions All questions carry equal marks.

Examiners: Mr. C.E. Manning Ms. M. Meagher Ms. A. Brown

Q1. (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 old enough to play these games

Write the HTML code and JavaScript for gatekeeper.html. You may assume that relevant the cookies are already 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 which wrote the cookie initially, what other pages (if any) may view a cookie?

In Finland, the personal identification number henkilötunnus (HETU) uses the form DDMMYYCZZZQ, where DDMMYY is the date of birth, C is the century identification sign (+ for the 19th century, - for the 20th and A for the 21st), ZZZ is the personal identification number (even for females, odd for males) and Q is a checksum character. For example 311280-999J.

The checksum character is calculated by treating the numeric parts of the HETU as one large number x. If n = x mod 31, then the checksum letter is the n th^ character from the string (10 -> A) "0123456789ABCDEFHJKLMNPRSTUVWXY".

Write a JavaScript function that takes a correctly formatted HETU as a parameter and evaluates to true if the checksum is correct and false otherwise.

Part A (18 marks) MegaCorp uses an 400 x 300 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.

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.