0% found this document useful (0 votes)
24 views3 pages

Design Project 2

Uploaded by

Kueteloic06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

Design Project 2

Uploaded by

Kueteloic06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Section A: MCQ (1X10=10 marks)

1- How do you create a hyperlink to another webpage in HTML?

(a) Using the <link> tag with the href attribute - Links stylesheets, not for hyperlinks

(b) Using the <a> tag with the href attribute

(c) By directly embedding the URL in the text - Not recommended for maintainability

(d) None of the above

2- What is the correct way to add an image to an HTML document?

(a) <img src="image.jpg"> - While it works, the alt attribute is important for accessibility

(b) <img src="image.jpg" alt="description">

(c) <picture src="image.jpg"></picture> - Used for responsive images with different sizes

(d) By uploading the image directly to the server - This doesn't embed the image in the HTML

3- What property in CSS is used to change the background color of an element?

(a) color (b) background-color (c) style (d) display

4- How can you target all <p> elements on a webpage with the same style rule in CSS?

(a) <p style="color: red"> (inline styles) (b) .paragraph { color: red; }

(c) #main-content p { color: red; } (descendant selector) (d) None of the above

5- What is the correct way to declare a variable in JavaScript that can be re-assigned later?

(a) const name = "John" (used for constants) (b) let name = "John"

(c) var name = "John" (has scoping issues, less preferred) (d) All of the above can be used

6- What data type will the following code evaluate to: typeof(10 + "5")?

(a) number (b) string (c) boolean (d) undefined

7- Which of the following is NOT a valid data type in PHP?

(a) integer (b) boolean (c) array (d) reference

8- How can you create a loop that iterates 5 times in PHP?

(a) for ($i = 0; $i < 5; $i++) { ... }

Page 1 of 3
(b) while ($i < 5) { ... } $i++

(c) do { ... } while ($i < 5);

(d) There is no looping construct in PHP

9- What is the purpose of the $_GET superglobal variable in PHP?

(a) To store session data (b) To access data passed through a URL query string

(c) To hold environment variables (d) To define global constants

10- Which function checks if a variable is of a specific data type?

(a) is_variable($var) (b) check_type($var)

(c) gettype($var) (d) is_type($var, "string")

Section B: Design Concepts (10 marks)

1. Explain the concept of SQL Injection vulnerabilities and how prepared statements in PHP can help
mitigate this risk. Provide a basic code example (using prepared statements) to demonstrate this
concept. (3 Marks)
2. Discuss the role of secure password hashing techniques in web applications. Briefly compare two
common hashing algorithms used with PHP and their security advantages. (3 Marks)
3. Describe the role of Cascading Style Sheets (CSS) and Javascript in web development. How can
these technologies potentially introduce security vulnerabilities? (2 Marks)

4. Discuss two best practices for securely storing user data in a web application. (2 Marks)

Section C: Scenario-Based Design (20 marks)


A. Given the following web page:

Welcome to my FCFA To EURO converter


FCFA EURO
=

1. Write the corresponding HTML code of this page knowing that the title of the page is HTML-CSS-
JAVASCRIPT 3 marks
2. Write a CSS code to specify the background color of the body to red, the font-family to Time new
roman and font-size to 14 2 marks

Page 2 of 3
3. Write a javascript that you will insert in the previous web page to perform the conversion from FCFA
to EURO when clicking on the button “=”. (Note that 1 EURO=656 FCFA) (5 marks)
B. You are tasked with designing a secure web application for a local library. The application will allow
users to search for books, manage their library accounts, and renew book loans online.

Instructions:

Using the scenario above, answer the following questions:

1. Identify three key security considerations you would prioritize during the design phase of the library
web application. Explain your reasoning. (3 Marks)
2. What web development tools would you recommend for this project and why? (3 Marks)
3. Design a simple login form for the library web application. Include essential security features such as
input validation and secure password storage. (4 Marks)

« Striving for success without hard work is like trying to harvest when you haven't planted." »
David Bly
GOOD LUCK

Page 3 of 3

You might also like