Cosc 326
Cosc 326
Cosc 326
COSC 326
COLLEGE
UNIVERSITY EXAMINATIONS
THIRD YEAR EXAMINATION FOR THE AWARD OF DEGRE OF
BACHELOR OF SCIENCE IN COMPUTER SCIENCE
a) Giving an example of each, differentiate between absolute and relative links [4 Marks]
b) An image ‘Mypicture.jpeg’ is needed in a web page such that when you click it, you are
taken to a web page namely “Home.html”. Show how this can be done using HTM: code.
[4 Marks]
c) Write the Mysql statetement that you would use to display all the records of a table
tblStudents and arrange them according to their Firstname in an ascending order.
[4 Marks]
d) What is a CMS with perspective to web design? Identify THREE types of CMS that you
could choose from as a web designer and developer [5 Marks]
e) What types of lists are supported by HTML? Identify them and give html code example
of how to achieve them [3 Marks]
f) Write php code that display information about the php environment on your browser
window [3 Marks]
g) Using php develop a program that declares a variable named color and initializes it with a
default color. The program then displays three lines in the format “My car is color”, “My
house is color” and “My boat is color” [7 Marks]
Page 1 of 3
COSC 326
a) Before using a Mysql database you need to connect and login to the server where the
database is located. Write and explain code you would use to achieve this [5 Marks]
b) Discuss the structure of a CSS style layout. Present a CSS style to format the background
color to black and color of font to red. [5 Marks]
c) CAPTCHA is a tool that is useful for designers and developers of websites and web
applications.
i. Describe CAPTCHA differentiating it from reCAPTCHA [5 Marks]
ii. Discuss applications of CAPTCHA in websites and web applications
[5 Marks]
Question 3 [20 Marks]
a) A page is required on which a form for user entry is presented. Users enter their First
Name and the Last Name on the form provided. The user then clicks a submit button
which is processed by a php page processWelcome.php. The browser displays a page
‘Welcome to my site Firstname LastName’. Use php to develop this application
[10 Marks]
b) Frames and tables are both usable in HTML to provide desktop layout and publishing
features.
i. How do Frames differ from tables? (3 Marks)
ii. Demonstrate usage of a Frame in structuring a HTML document (7 Marks)
a) You have been required to create a form that asks users to input their Name, Age
and Country. The user then clicks a button and when they do so these details are
displayed on a web page. Write PHP code that implements both the creation of
the form and the processing of the same [7 Marks]
Page 2 of 3
COSC 326
b) One of the most common elements of a web page is graphic elements. Identify
FOUR types of images that most browsers recognize, their strengths and
weaknesses [8 Marks]
Page 3 of 3