UNIVERSITY EXAMINATION 2023/2024
YEAR II SEMESTER II EXAMINATION FOR BACHELOR OF SCIENCE IN SOFTWARE
ENGINEERING.
spe 2210: client-side programming
Date: Friday, 26th April 2024 Time: 11.00am – 1.00pm
Instructions
i. This EXAMINATION has TWO sections.
ii. SECTION A is compulsory. Answer ALL questions in this section.
iii. Answer ANY TWO questions in SECTION B.
SECTION A:
QUESTION ONE (30 MARKS) – COMPULSORY
a) Use relevant examples to explain the following terms in the context of internet Web
Development. (3 marks)
i. URL
ii. HTPPS
iii. Web based Application.
b) .
i. Write extract codes to create the following HTML table. (5 marks)
Page 1 of 4
Table border size=1
HTML heading 1 for “Birds Collection”
HTML color black for colored cell
Text Group, Cage and Qty bold and underline
Text Kestrel, Cardinal, and Pink Pigeon italic
Image source is bird.gif
ii. Convert the image in part (b) into a clickable hyperlink. (2 marks)
iii. What is the difference between relative and absolute path? (2 marks)
c) Clearly distinguish between HTML and XHTML as used in internet applications.
(2 marks)
d) Write a complete script using a java script function called welcome whose purpose is to
display your name, and your best meal. (4 marks)
e) Using illustration explain the tier 1, tier 2 and tier 3 architectures of web applications.
Each tier define the language used and functions. (6 marks)
f) Describe Three common image formats used on the web. (6 marks)
SECTION B:
QUESTION TWO (20 MARKS)
a) Give the function of the following with respect to internet communication:
(6 marks)
i. IP address
ii. URL
iii. DNS server
b) write the HTML code for the following output: (5 marks)
Departments:
B. Finance
C. Administrative
D. Quality Assurance
• Division 1
• Division 2.
c) Explain the meaning of the following attributes as used in a FORM tag:
using a code snippet
i. Action (2 marks)
ii. Method. (2 marks)
Page 2 of 4
d) Rewrite the following tag to make the page open in a new browser window.
<a href=” http://www.ABC.ac.ke”> ABC website<a/> (2 marks)
e) Describe how styles defined on style.css file may be linked to html pages. (3 marks)
QUESTION THREE (20 MARKS)
a) Other than the title tag, mention any four other tags can be used within the HEAD tag.
(2 marks)
b) Write a JavaScript program to calculate and display the sum of two numbers, given
Mark A and B from the form shown below
(5 marks)
c) Using a loop of your choice, write a JavaScript code that would produce the output
below inside a pull down option as shown (6 marks)
d) Wakahare has been employed as a new database administrator at GEE supermarket.
What will be his five roles in maintaining the company e-commerce website.(5 marks)
QUESTION FOUR (20 MARKS)
a) What is a cookie? how are they important in web-based applications. (2 marks)
b) Describe the following concepts as used in web development with examples. (4 marks)
i. Client side programing
ii. Server side programing
c) Consider the code snippet below.
Page 3 of 4
What output is generated by the code above (4 marks)
d) Write CSS for an HTML page to: (6 marks)
Set the background color
Set the size of the font
Create a hyperlink without an underline
e) Explain the following email protocols
i. SMTP (2 marks)
ii. POP (2 marks)
QUESTION FIVE (20 MARKS)
a) Outline the significance of the following tools in creating responsive internet applications:
(8 Marks)
i. CSS
ii. JavaScript
iii. PHP
iv. Framework
b) Describe how a web server works, and the steps that take place from your initial request
for a World Wide Web document using a web browser until the requested document
renders in your browser. (6 Marks)
c) Give the function of the following HTML tags: (6 Marks)
i) <Ahref="#"><IMG SRC=”img.png”></A>
ii) <UL Type=”square”><LI>Item 1</LI><LI>Item 2</LI></UL>
iii) <Meta name="keywords" content="HTML,CSS,XML,JavaScript">
iv) <Input type="date" name="bday" min="2000-01-02">
v) <TD COLSPAN=3>My heading goes here</TD>
vi) <link rel="stylesheet" type="text/css" href="styles.css">
Page 4 of 4