2023/24 ACADEMIC YEAR
FIRST SEMESTER EXAMINATION
SECOND YEAR EXAMINATION FOR THE BACHELOR OF SCIENCE (COMPUTER
SCIENCE, BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY,
BACHELOR OF BUSINESS AND INFORMATION TECHNOLOGY)
CSC 217: WEB PROGRAMMING AND APPLICATIONS
DATE: 06/12/2023 TIME: 8:30 AM – 10:30 AM
INSTRUCTIONS:
Answer Question ONE and ANY other two Questions
QUESTION ONE (30 MARKS)
a) Outline ANY five advantages of Client/Server architecture. (5 marks)
b) Categorize the size measures for cost estimation and risk assessment of Web application
development projects. (5 marks)
c) The objective of any website is to get viewed and read as much as possible. Discuss any five
key elements of a good website. (5 marks)
d) Determine the output of the program snippet below
(5 Marks)
<SCRIPT LANGUAGE=”JavaScript”>
Vara,b,c; a=4; b=++a; c=a++;
document.write(“a is ”,a);
document.write(“<br> b is ”,b);
document.write(“<br> c is ”,c);
</script>
e) Using examples distinguish between the following in relation to cascading style sheets
i. The class selector (2 marks)
ii. The id selector (2 marks)
Knowledge Transforms
f) A form is an object in the document object model. Discuss at least five elements (objects)
under the form object and possible use of each object during web application development.
(5 marks)
g) Using HTML code, illustrate how to create a links to the top, bottom and centre of the same
page. (6 marks)
QUESTION TWO (20 MARKS)
a) Create a web page, divide the web page into four frames. In one frame create three links that
will display different HTML forms in the remaining three frames respectively. (10 marks).
b) Write a HTML program to display a table with 5 rows and 4 columns. Provide appropriate
heading to the form. (10 marks).
QUESTION THREE (20 MARKS)
a) Write HTML Code to demonstrate the use of Anchor Tag for the Following (10 marks)
i. Creating a web link that opens in a new window.
ii. Creating a web link that opens in the same window
iii. Reference within the same html document.
iv. Reference to some image
b) Write HTML code to generate the following output. (10 marks)
A.Fruits
i. Oranges
ii. Bananas
B.Vegetables
i. Carrots
ii. Cabbages
iii. Kales
C.Cereals
i. Beans
ii. Peas
Knowledge Transforms
QUESTION FOUR (20 MARKS)
a) Web projects cost estimation is the process through which the web developer decides how
much the development process of the website will cost the organization. Discuss any five
reasons why the cost for Web development is difficult to estimate. (10 marks)
b) In CSS, the term "box model" is used when talking about design and layout. The CSS box model
is essentially a box that wraps around HTML elements. Provide a sketch of the box model and
use it to explain the various components. (10 marks)
QUESTION FIVE (20 MARKS)
a) Write JavaScript codes that will perform the following
i. Get three numbers from the user through a prompt box then display the sum and
average of these numbers on the web browser. (3 Marks)
ii. Define a JavaScript function that receives a person’s age and if the age is greater than
or equal to 18 it displays the word “Adult” on the browser else it displays
“Child” (3 Marks)
iii. Write a script that displays all even numbers between 20 and 100 on the users’ web
browser. (4 marks).
b) Demonstrate using relevant explanations how JavaScript can be used to accomplish the
following
i. React to events (2 marks)
ii. Read and write HTML elements (2 marks)
iii. Validate data (2 marks)
iv. Detect the visitor's browser (2 marks)
v. Create cookies (2 marks)
--END--
Knowledge Transforms