BIT 4303 ADVANCED WEB DESIGN  DEVELOPMENT KCA Past Paper

UNIVERSITY EXAMINATIONS: 2014/2015
ORDINARY EXAMINATION FOR THE BACHELOR OF SCIENCE
IN INFORMATION TECHNOLOGY
BIT 4303 ADVANCED WEB DESIGN & DEVELOPMENT
DATE: DECEMBER, 2014 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE (COMPULSORY 30 MARKS)
(a) Differentiate between the following terms:
(i) Client side and server side scripting [4 Marks]
(ii) Quality assurance and quality control [4 Marks]
(b) Define term class and differentiate it from ID as used with Cascading style sheets in
web development [4 Marks]
(c) Styles sheets were added to HTML 4.0 to solve a problem. Using examples to
illustrate, explain the problem solved by use of style sheets. [5 Marks]
(d) Describe situations where it might be necessary to place java script code in an
external file. [3 Marks]
(f) Provide syntax to illustrate how JavaScript functions are defined
[6Marks]
(g) Explain the relationship between functions and events in JavaScript
[4Marks]
QUESTION TWO (20 MARKS)
a) Study the following HTML registration form and write a function validate which:
i) validates the “@” symbol in the e-mail address and returns “Not a valid e1
mail” message in case its missing. [3 Marks]
ii) Checks that Name should not be more than 16 letters
[5Marks]


b) Describe the three methods of adding style sheets to html documents [12Marks]
QUESTION THREE (20 MARKS)
(a)Describe the main parts of a style sheet rule using an example to illustrate
[8Marks]
(b) Define Event Handlers as used in JavaScript [3 Marks]
c) Using appropriate event handlers write a javascipt code that changes the
background colour when the mouse is placed and then taken off the link [4 Marks]
(d) Describe the following Javascrpt events
i) onBlur
ii) OnChange
iii) OnLoad
iv) OnFocus
v )OnClick [5 Marks]
QUESTION FOUR (20 MARKS)
a) Explain three types of cookies used in websites. [6 Marks]
b) Explain any three advantages of using CSS(cascading style sheets) [6 Marks]
c) Write code for a php function that can be used to calculate the product of two numbers
d) Describe using examples how exceptions are handled in web design [4 Marks]
c) List the tools needed for server side scripting [4 Marks]
QUESTION FIVE (20 MARKS)
a) Sketch the output of the following [6 Marks]
<HTML>
<HEAD>
<TITLE> JavaScript Exercise 3 </TITLE>
<PRE>
<SCRIPT LANGUAGE = “JavaScript”>
<!– HIDE THE SCRIPT FORM OTHER BROWSERS
document.writeln(“<CENTER><H1>Welcome to</H1>”);
document.writeln(“<H2>Informatics Computer School</H2><HR>”);
document.writeln(“JavaScript is fun!!!!!!!!!!!”);
document.write(“I am learning JavaScript, “);
document.write(“and this is the third exercises.</CENTER>”);
// STOP HIDING FORM OTHER BROWSERS –>
</SCRIPT>
</HEAD>
</HTML>
(b) Study the php code below and answer the questions that follow
<html>
<body>
<?php
$db = mysql_connect(“localhost”,”root”);
mysql_select_db(“mydb”,$db);
$result = mysql_query(“SELECT * FROM employees”,$db);
printf(“First Name: %s<br>\n”, mysql_result($result,0,”first”));
printf(“Last Name: %s<br>\n”, mysql_result($result,0,”last”));
printf(“Address: %s<br>\n”, mysql_result($result,0,”address”));
printf(“Position: %s<br>\n”, mysql_result($result,0,”position”));
?>
</body>
</html>
(a) Describe the purpose of each of the following statements in the code above
(i) mysql_connect() function
(ii) mysql_select_db()
(iii) mysql_query()
(iv) mysql_result() [6 Marks]
c) The Internet has the potential to provide many benefits to companies in terms of
communication. Describe FOUR processes that a business may carry out using
the Internet explaining the application involved and the benefit to the company.
Outline any drawbacks involved in each process. [8 Marks]

(Visited 558 times, 3 visits today)
Share this:

Written by