You are on page 1of 6

EXAMINATION PAPER:

ACADEMIC SESSION 2008/09

Campus School Subject group Level TITLE OF PAPER COURSE CODE Date and Time BAHRAIN GREECE KENYA MALAYSIA MAURITIUS SINGAPORE SOUTH AFRICA TANZANIA UAE

Maritime Greenwich Computing and Mathematical Sciences Computing Science Three Web Engineering COMP1309 Wednesday 3rd December 2008 15:00 15:00 16:00 18:30 18:00 18:30 15:00 16:00 17:00 BOTSWANA HONG KONG LONDON MALTA SAUDI ARABIA SRI LANKA SYRIA TRINIDAD ZAMBIA 15:00 18:30 13:00 14:00 16:00 18:30 14:00 09:30 15:00

You MUST answer question 1 which is worth 40 marks. Answer TWO questions from the remaining THREE questions, questions 2 to 4 which are worth 30 marks each. If you answer all THREE questions from questions 2 to 4, marks will ONLY be awarded for your TWO best answers. CALCULATORS AND OTHER ELECTRONIC DEVICES ARE NOT PERMITTED

View Web Engineering Exam Questions and Answers Guide

Approved______________________________________________________________ 1. (a) Study the DHTML web page source code given below. Line numbers have been added so that you may refer to them in your answer. The code is stored in a file called new.html, and in the same directory with new.html there is a GIF image named pointer.gif.

pointer.gif

Describe in detail, with the aid of a figure, what you expect to see in the browser when this page is loaded. [15 Marks] (b) Describe in detail, with the aid of a series of figures, how the image pointer.gif is being used by the code below and what you expect to see in the browser. [25 marks]

01 02 03 04 05 06

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Form field hints with CSS and JavaScript</title> <style type="text/css">

/* comment removed for exam version */ 07 dl { 08 font:normal 12px/15px Arial; 09 position: relative; 10 width: 350px; 11 } 12 dt { 13 clear: both; 14 float:left; 15 width: 130px; 16 padding: 4px 0 2px 0; 17 text-align: left; 18 } 19 dd { 20 float: left; 21 width: 200px; 22 margin: 0 0 8px 0; 23 padding-left: 6px; 24 } /* comment removed for exam */ 25 .hint { 26 display: none; 27 position: absolute; 28 right: -250px; 29 width: 200px; 30 margin-top: -4px; 31 border: 1px solid #c93; 32 padding: 10px 12px; /* comment removed for exam */ 33 background: #ffc url(pointer.gif) no-repeat -10px 5px; 34 } /* comment removed for exam */

Question 1 continues on the next page

Web Engineering COMP1309 Page 2 of 6

Approved______________________________________________________________
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 .hint .hint-pointer { position: absolute; left: -10px; top: 5px; width: 10px; height: 19px; background: url(pointer.gif) left top no-repeat; } </style> <script type="text/javascript"> //<![CDATA[ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } function prepareInputsForHints() { var inputs = document.getElementsByTagName("input"); for (var i=0; i<inputs.length; i++){ // comment removed for exam if (inputs[i].parentNode.getElementsByTagName("span")[0]) { // comment removed for exam inputs[i].onfocus = function () { this.parentNode.getElementsByTagName("span")[0].style.display "inline"; } // comment removed for exam inputs[i].onblur = function () { this.parentNode.getElementsByTagName("span")[0].style.display "none"; } } } // repeat the same tests as above for selects var selects = document.getElementsByTagName("select"); for (var k=0; k<selects.length; k++){ if (selects[k].parentNode.getElementsByTagName("span")[0]) { selects[k].onfocus = function () { this.parentNode.getElementsByTagName("span")[0].style.display "inline"; } selects[k].onblur = function () { this.parentNode.getElementsByTagName("span")[0].style.display "none"; } } } } addLoadEvent(prepareInputsForHints); //]]> </script> </head> <body> <p style="font:normal 12px/15px Arial;">Tab or click through the topics if you dare.</p> <dl> <dt> <label for="firstname">First Name:</label> </dt> <dd> <input name="firstname" id="firstname" type="text" />

Question 1 continues on the next page

Web Engineering COMP1309 Page 3 of 6

Approved______________________________________________________________
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 </dd> <dt> <label for="lastname">Last Name:</label> </dt> <dd> <input name="lastname" id="lastname" type="text" /> <span class="hint">This is the name your sergeant called you when you went through bootcamp.<span class="hint-pointer">&nbsp;</span></span> </dd> <dt> <label for="email">Email:</label> </dt> <dd> <input name="email" id="email" type="text" /> <span class="hint">The thing with the @ symbol and the dot com at the end.<span class="hint-pointer">&nbsp;</span></span> </dd> <dt><label for="year">Birth Year:</label></dt> <dd> <select id="year" name="year"> <option value="">YYYY</option> <option value="1066">1066</option> <option value="1492">1492</option> <option value="1776">1776</option> <option value="1812">1812</option> <option value="1917">1917</option> <option value="1942">1942</option> <option value="1999">1999</option> </select> <span class="hint">Pick a famous year to be born in.<span class="hintpointer">&nbsp;</span></span> </dd> <dt> <label for="username">Username:</label> </dt> <dd> <input name="username" id="username" type="text" /> <span class="hint">Between 4-12 characters.<span class="hintpointer">&nbsp;</span></span> </dd> <dt> <label for="password">Password:</label> </dt> <dd> <input name="password" id="password" type="password" /> <span class="hint">Between 5-13 characters, but not 7. Never 7. <span class="hint-pointer">&nbsp;</span></span> </dd> <dt class="button">&nbsp;</dt> <dd class="button"> <input type="submit" class="button" value="Submit" /> </dd> </dl> </body> </html> <span class="hint">This is the name your mama called you when you were little.<span class="hint-pointer">&nbsp;</span> </span>

Web Engineering COMP1309 Page 4 of 6

Approved______________________________________________________________ 2. (a) Give three advantages of XML over HTML. [9 marks] (b) Will the following XHTML/XML code validate as XHTML 1.0 Strict? Line numbers have been added so that you may refer to them in your answer. This code is stored in a file called go.html. [6 marks]

01 <?xml version="1.0"?> 02 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 03 <html xmlns="http://www.w3.org/1999/xhtml"> 04 <head> 05 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 06 <title>Introduction to XML</title> 07 </head> 08 <body> 09 <h1>Introduction to XML</h1> 10 <div id="courseNum">XML101</div> 11 <div id="courseLength">3 days</div> 12 <h2>Prerequisites</h2> 13 <ul> 14 <li>Experience with Word Processing</li> 15 <li>Experience with HTML (optional, but recommended)</li> 16 </ul> 17 <h2>Course Outline</h2> 18 <div id="outline"> 19 <ul> 20 <li> 21 XML Basics 22 <ul> 23 <li>What is XML?</li> 24 <li> 25 XML details 26 <ul> 27 <li>XML Lecture 1</li> 28 <li>XML Lecture 2</li> 29 <li>XML Lecture 3</li> 30 <li>XML Lecture 4</li> 31 <li>XML Lecture 5</li> 32 </ul> 33 </li> 34 </ul> 35 <ul> 36 <li> 37 XML Documents 38 <ul> 39 <li>Introduction</li> 40 <li>Elements</li> 41 <li>Attributes</li> 42 <li>CDATA</li> 43 <li>XML Syntax Rules</li> 44 <li>Special Characters</li> 45 </ul> 46 </li> 47 </ul> 48 <ul> 49 <li>Creating a Simple XML File</li> 50 </ul> 51 </li> 52 </ul> 53 </div> 54 </body> 55 </html>

(c)

Describe in detail, with the aid of a figure, what is an XML schema and give an overview of the schema types. [15 marks]

Web Engineering COMP1309 Page 5 of 6

Approved______________________________________________________________ 3. (a) (b) (c) What should you validate your web pages for? [3 marks] Why you should validate your web pages? [4 marks] Accessibility is crucial for web applications. List eight accessibility checks that you should make before publishing a web page. [8 marks] Using Cascading Style Sheets has many advantages. List five of the most important advantages. [5 marks] What are the benefits of Web Standards when it comes to visitors to your web pages, the web site owner and to yourself with responsibility for the site development and maintenance? [10 marks]

(d)

(e)

4. (a) More and more Open Source software is being used on various web applications. What is meant by the term Open Source? [12 marks] Web application security is something that should be always on the top of the list of every web developer. What are the most important things that you would check before you make your application available online? [18 marks]

(b)

View Web Engineering Exam Questions and Answers Guide

Web Engineering COMP1309 Page 6 of 6

You might also like