BIT 4303 ADVANCED WEB DEVELOPMENT KCA Past Paper

UNIVERSITY EXAMINATIONS: 2012/2013
THIRD YEAR EXAMINATION FOR THE BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 4303 ADVANCED WEB DEVELOPMENT
DATE: DECEMBER, 2012 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE
a) Differentiate between the following terms:
(i) Client side scripting and server side scripting (4 Marks)
(ii) Fat client and thin client (4 Marks)
b) Define Cascading style sheets as used in web development (2 Marks)
c) Describe two advantages of using Styles sheets to design websites today.5 Marks
d) Describe situations where it might be necessary to place java script code in an
external file. (3 Marks)
e) Write code to Create a class and apply it to centre align all paragraphs a web page
(6 Marks)
f) Provide syntax to illustrate how JavaScript functions are defined (4 Marks)
g) Explain the relationship between functions and events in JavaScript (2 Marks)
QUESTION TWO
a) Describe the main parts of a style sheet rule using an example to illustrate
(8 Marks)
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 THREE
a) Write code to create a database named KCA in MYSQL, create a table called
employees, fields in the table should include, employee id, first name, last name,
address, position and department. (10 Marks)
b) Insert any three records into the database (3 Marks)
c) Write code to connect the database to your website using PHP and display the
details above (7 Marks)
QUESTION FOUR
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 e-mail” message in case its missing.
ii. Checks that Name should not be more than 16 letters


(12 Marks)
b) Explain briefly, any three security threats to a Web server (8 Marks)
QUESTION FIVE
a) Sketch the output of the following (4 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”));
4
?>
</body>
</html>
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()
(8 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 96 times, 1 visits today)
Share this:

Written by