You are on page 1of 2



Assignment 1

Section A: Theory

a) Discuss the history of internet and www. [4 mks]

b) Discuss the role of the following in web applications development and write a
simple example of each. [10 mks]
ii) CSS
iii) XML
iv) Client side script such as JavaScript
v) Server side script such as PHP
c) A JavaScript program is required to calculate wages for employees of
Kamonjo Ltd. Using the following formulae.

a. Basic salary = No of Hours * hourly rate

b. Lunch Allowance = 200

c. Gross Salary = Basic Pay + Lunch Allowance
d. Income Tax charged on gross pay is 30% of the gross
e. Net pay = Gross pay Tax
Hourly rate and lunch allowance are constant values. The number of hours worked
should be read from the keyboard. Write a program process salary for an employee.
[6 marks]

d) Write an HTML document which will produce the following table [7 marks]

Money spent on.... January February

Clothes $241.10 $150.20

Make-Up $30.00

Food $730.40 $650.00

Sum $1001.50 $744.65

Total $1746.15
e) Write a PHP program that produce the table given below: [6 marks]

Name City Telephone

James Ukoo Washington 0440-798000
Jerry Willy New Yolk 0493-21300

e) Use for loop or while loop to design a PHP program that generates the table layout given
below: [7 marks]

Number Square of the Number

1 1
2 4
3 9
4 16
5 25


Vander vlist Eric, Ayers, Danny Bruchez (2007)bProfessional web 2.0 programming :

Lecky Thompson, Guy w (2008) Just enough programming with Xhtml, Php, and Mysql
(2008) Course technology