Bbit 201 Internet Application Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

UNIVERSITY EXAMINATIONS: 2014/2015

ORDINARY EXAMINATION FOR THE BACHELOR OF SCIENCE


IN INFORMATION TECHNOLOGY

BBIT 201 INTERNET APPLICATION PROGRAMMING

DATE: DECEMBER, 2014 TIME: 2 HOURS


INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE [30 MARKS]


a) Explain any four html text formatting elements. [4 marks]
b) Explain the three elements used to create a list in html. [3 marks]
c) Write an html code to display a frameset with three frames whose cols specifications
are 25%,30% and * . [6 Marks]
d) Write an html code that displays the following video clips in the same web page.
Kigoma.mp4 and Wimbo.mp4. [6 Marks]
e) Write down a JavaScript code to print the pattern below using nested for loop

* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
[7 Marks]

f) Diffentiate between GET and POST values as used in a method attribute for a PHP form.
[ 4 marks]

1
QUESTION TWO [20 MARKS]

a) Explain three ways how you can place a javaScript in an html document. [3 Marks]
b) Briefly explain the use of the following functions in javaScript.
i) Document.write()
ii) Prompt()
iii) getElementById()
iv) Document.alert()
[8 marks]

c) Write a javaScript code to validate the following checkboxes in the form named
school.

[9 Marks]

QUESTION THREE [ 20 MARKS]


a) Discuss any four controls of a form in html and state the html code snippet for each
control. [4 Marks]
b) Write an html code to create a table shown below.

Empno Firstname Surname Department Designation Age

E001 George Mutwiri HR Clerk 29

E002 Amina Omar Sales Clerk 27

E004 Fatuma Bidii Sales Supervisor 26

E008 Festus Kitonga Sales Clerk 25

E012 John oduor Marketing Clerk 24

E015 Kellen Makori HR manager 38

2
[8 Marks]

c) Given the following form that is used to process transaction, write a javascript code to
test if the user has entered values in all the textboxes then calculate and displays the
total price in the field total price(hint total price=product quantity*unit price) after the
user clicks Calculate button.

[8 marks]

QUESTION FOUR [20 MARKS]


a) Write an html code to display the form whose action attribute value is cashier.php
and method attribute value is post as shown below.

[10 Mark]

b) Write a php script to create a file called cashier.php that acts the as the backend to
receive the data send in [a] above then calculates and displays current balance( hint
current balance=previous balance+deposit). When the user enters account number as
000122, account names samsang, previous balance as 1000 and deposit as 5000 then
the page appears as follows:

3
[10 Marks]

QUESTION FIVE [20 MARKS]


a) Discuss the difference between client side scripting server side scripting. Give an example for
each. [4 Marks]
b) Compare and contrast do and while loop as used in PHP. [4 Marks]
c) Discuss the importance of a DBMS as used in online applications. Hence give two examples
of DBMS products apart from mySQL. [6 Marks]
d) Discuss the importance of the following functions as used in mySQL.
i) Mysqli_connect()
ii) Mysqli_query() [6 Marks]

You might also like