Cosc 326

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

THARAKA UNIVERSITY

COSC 326

COLLEGE

(A Constituent College of Chuka University)

UNIVERSITY EXAMINATIONS
THIRD YEAR EXAMINATION FOR THE AWARD OF DEGRE OF
BACHELOR OF SCIENCE IN COMPUTER SCIENCE

COSC 326: WEB DESIGN AND DEVELOPMENT

STREAMS: BSC (COSC) TIME: 2 HOURS

DAY/DATE: THURSDAY 09/04/2020 11.30 AM – 1.30 PM

SECTION A: ANSWER ALL QUESTIONS IN THIS SECTION

QUESTION 1 [30 MARKS]

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

SECTION B: ANSWER ANY TWO QUESTIONS IN THIS SECTION

Question 2 [20 Marks]

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) What is CSS? [3 Marks]

c) A CSS is required to format a table to have properties border=3px, a solid border of


color=”red”. Show the code for this CSS [7 Marks]

Question 4 [20 Marks]


a) Write an HTML code to diplay a page with at least 5 items; then sketch how the page will
look like [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)

Question 5 [20 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]

c) Demonstrate how to create connections both to a MySQL server and to a database


using PHP [5 Marks]
---------------------------------------------------------------------------------------------------

Page 3 of 3

You might also like