UNIVERSITY EXAMINATIONS: 2016/2017
ORDINARY EXAMINATION FOR THE DEGREE IN BACHELOR
OF BUSINESS INFORMATION TECHNOLOGY
BBIT 201 INTERNET APPLICATION PROGRAMMING
MODE: FULL TIME/PART TIME/DISTANCE LEARNING
DATE: AUGUST, 2017 DURATION: 2 HOURS
INSTRUCTIONS: Answer question ONE and any other TWO questions
QUESTION ONE [30 MARKS]
a) Briefly explain the concept of internet application.
[2 Marks]
b) Describe, using a well labelled diagram, how an internet application works.
[4 Marks]
c) Differentiate between an attribute and an element in HTML
[2 Marks]
d) Differentiate between client side scripting and server side scripting.
[2 Marks]
e) Describe any FOUR lexical elements in a javascript program.
[8 Marks]
f) Briefly explain the output of the following javascript program.
<script>
var n,m;
n=2;
while(n<=8){
m=n+3;
document.write(m);
document.write(“<br>”);
n++;
}
</script>
[4 Marks]
g) Write html tags to display the following form:
[8 Marks]
QUESTION TWO [20 MARKS]
a) Describe the four calculation operators you can use in a javascript code.
[8 Marks]
b) Briefly differentiate between do and do while control structures in a javascript
code.
[6 Marks]
c) Write a javascript code to display odd numbers greater than 0 but less than 100.
[6 Marks]
QUESTION THREE [20 MARKS]
a) Describe any THREE uses of a form in an online application.
[3 Marks]
b) Briefly describe the following elements of a form:
i. Legend
ii. Textbox
iii. Radio option
iv. Button
[4 Marks]
c) Define syntax error and give two examples of syntax errors in a javascript program.
[4 Marks]
d) Write a javaScript code to receive ten (10) numbers, store them in an array called
nums, then calculate and display the sum of all the numbers, using dialog boxes.
[9 Marks]
QUESTION FOURR [20 MARKS]
a) Explain the output of the following PHP program.
<? php
function calc($price, $tax=””)
{
$total = $price + ($price * $tax);
echo “$total”;
}
calc(42);
?>
[3 Marks]
b) Describe THREE advantages of server side scripting.
[3 Marks]
c) Explain the difference between POST and GET methods in a form.
[4 Marks]
d) Describe any THREE rules for naming PHP variables.
[3 Marks]
e) PHP is considered a loosely typed language, explain.
[3 Marks]
f) Describe four operators used in a PHP program.
[4 Marks]
QUESTION FIVE [20 MARKS]
a). Using function write a program in JavaScript to take two arrays of integer numbers
and multiply each corresponding values and put the result in a third array.
[8 Marks]
b). Differentiate between a break and continue statements in a for loop in javascript.
[4 Marks]
c). Before we can access data in MySQL database, we must first connect to the
database. In this regard, explain the following database connection statement.
$a = new mysqli($b, $c, $d);
[6 Marks]
d). Explain two uses of functions in javaScripts program.
[2 Marks]