


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Exam questions from a higher certificate in science in computing (accs) course focused on internet studies & web design. The questions cover topics such as credit card validation using luhn formula, javascript script for isbn validation, reading cookies for user information, rgb values determination, and creating an image map for html. Students are required to answer all questions, which carry equal marks.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Instructions Answer FOUR questions All questions carry equal marks.
Examiners: Mr. C.E. Manning Ms. M. Meagher Ms. A. Brown
Q1. (Total 25 marks) Part A (8 marks) Using Luhn formula for credit card validation determine if 4599228208463758 is a valid credit card 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 false if it is not valid.
Q2. (Total 25 marks)
Part A (20 marks) A website has saved a cookies on the user’s computer. 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 assume that you know for certain that the cookie is present for this user.
Part B (5 marks) For security and privacy reasons cookies are not generally available to just any server that requests to see them. Apart from the page that wrote the cookie initially, what other pages (if any) may view a cookie?
The table above shows three differently coloured pixels that have been used to simulate R:200 G: B:60 by dithering. A is R:190 G:100 B: B is R:100 G:040 B:
Part A (17 marks)
What RGB values does C have?
Part B (8 marks)
Propose an alternative 2-colour dithering scheme for R:190 G:20 B:
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 To España
And she went to CIT She went
almost (^) everywhere
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”