UNIVERSITY EXAMINATIONS: 2020/2021
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
BUSINESS INFORMATION TECHNOLOGY
BBIT 201: INTERNET APPLICATION PROGRAMMING
FULL TIME/ PART TIME/ DISTANCE LEARNING
ORDINARY EXAMINATION
DATE: AUGUST, 2021 TIME: 3 HOURS
INSTRUCTIONS: Answer Question ONE COMPUSORY and ANY OTHER TWO questions
QUESTION one [20 MARKS]
a) Write a javaScript program that uses two functions. The first function receives two integers
from the user using dialog boxes then passes the values to another function that calculates the
product of the two numbers and returns the correct answer to the calling function.
10 Marks
b) Describe THREE uses of a form in an online application. 6 Marks
c) Differentiate between GET and POST method values in a form. 4 Marks
QUESTION Two [15 MARKS]
a) Differentiate between an attribute and an element in HTML. 5 Marks
b) Write the HTML code to make the word kca an absolute hyperlink to www.kca.ac.ke
5 Marks
c) Write the CSS code to add a pink background color to a class selector called “drivein”
5 Marks
QUESTION Three [15 MARKS]
a) Write a JavaScript program to receive ten floating point values, store them in an array, then
calculate and display their average. 4 Marks
b) Write a JavaScript program to get the user input for the floor the user wants to go using a lift
and displays the appropriate remark using switch case.
6 Marks
c) Describe TWO uses of graphics in a web page. 3 Marks
d) Write html tags to display an image stored in the path c:\Documents\Folder2\mypic.gif
2 Marks
QUESTION Four [15 MARKS]
a). Explain the use of marquee element in a web page. 1 Marks
b). Discuss the importance of a DBMS as used in online applications. Hence give two
examples of open source DBMS products apart from mySQL. 4 Marks
c). Write a PHP program to calculate and display cost of the products using the formula:
Cost=TAX * (quantity*unit price). Assume the TAX is a constant 0.16. The values of
quantity and unit price are send as form values to the backend for server side processing.
6 Marks
d) Write a PHP program to print even numbers greater than 1 and less than 100 on a web
page the browser opens. 4 Marks