0% found this document useful (0 votes)
23 views4 pages

Une Copie de La Feuille de Match

Il n'y a pas de sujet spécifique, juste une version d'essai sur laquelle je peux m'entraîner.

Uploaded by

mohameddz284848
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)
23 views4 pages

Une Copie de La Feuille de Match

Il n'y a pas de sujet spécifique, juste une version d'essai sur laquelle je peux m'entraîner.

Uploaded by

mohameddz284848
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/ 4

Ministry of Higher Education and Scientific Research

University of Tissemsilt
Faculty of Sciences and Technology
Department of Mathematics and Computer Sciences

Exam: Web Application Development Domain / Field / Specialty: Math & Info / Computer Science / ISIL
Academic Year: 2023 / 2024 Semester / Session: S05 / SN Date: 16/05/2024

Part I: Questions
1. What is the difference between static and dynamic web pages?
2. What is the primary function of XML?
3. Explain how XML differs from HTML in terms of usage and capabilities.
4. What does PHP stand for?
5. What is the difference between Mysqli and PDO (PHP Data Objects)?
6. In PHP, what are the differences between the GET and POST methods for sending data
to a server?

Part II: Practical


1. Write HTML code to create a simple web page with the following elements:
a) A heading tag (h1) with the title "My Web Page"
b) A paragraph tag (p) containing a concise description of your webpage using 20
random words.
c) An image tag with a source linked to a relevant image.
2. Create a CSS snippet that styles a paragraph with the id "introduction" to have a font-size
of 16px, a blue color, and a yellow background.
3. Write a JavaScript function that validates a form input (institute, departement) to ensure it
is not empty.
4. Write a simple PHP script that creates a class named "Book" with properties for title,
author, and price, and a method to display these properties.
5. Style a navigation bar (nav) to display horizontal links to "Home", "World News", "Sports",
and "Contact Us". Ensure these links are evenly distributed across the full width of the
navigation bar
6. Let $a=10; et $b=12;, What is the result of the following code?
echo " a = ".$a++." and b = ".$b;
echo " a = ".++$a." and b = ".(boolean)$b;
echo " a = $a and b = $b"; echo ' a = $a++ and b = $b';
7. What is the result of the following code
$a = 1;
++$a;
$a *= $a;
echo $a--;

Exam correc on
Exam correcƟon: Web Application Development Semester / Session: S05 / SN Date: 16/05/2024

Part I: Questions (08M)


1. What is the difference between static and dynamic web pages? (02M)
Feature Static Web Pages Dynamic Web Pages
Content Fixed content Variable content
Technology HTML, CSS, sometimes JavaScript Server-side scripting (PHP, ASP.NET, Python, etc.) and databases
(MySQL, PostgreSQL, etc.)
Interactivity Limited High
Performance Generally faster Potentially slower due to server-side processing
Examples Company homepages, personal Social media platforms, e-commerce sites, CMS (e.g., WordPress),
blogs, portfolios web applications
Updates Requires manual updates by the Content can be updated dynamically based on user interactions or
developer database queries
Cost Generally lower Can be higher due to complexity and server requirements
Scalability Simple to scale More complex to scale due to dynamic content generation

2. What is the primary function of XML? (0.5M)


XML was designed to store and transport data
3. Explain how XML differs from HTML in terms of usage and capabilities (02M)
Feature XML HTML
Purpose Data exchange and representation Displaying content and structure of web pages
Structure Hierarchical tree-like (nested elements) Flexible, some self-closing elements
Data Definition Extensible - define new elements/attributes Predefined set of elements and attributes
Tags Opening and closing tags required for each Some elements self-closing (e.g., <br>)
element (except some empty elements)
Validation Often uses DTDs or XSDs for validation Limited validation, relies on browsers
Focus Structured data representation Visual presentation and user interaction

4. What does PHP stand for? (0.5M)


PHP : Hypertext Preprocessor
5. What is the difference between Mysqli and PDO (PHP Data Objects)? (01M)
Feature MySQLi PDO
Database MySQL only Multiple databases (MySQL, PostgreSQL, SQLite,
Support etc.)

Usability Ideal for MySQL-specific projects, offers Ideal for projects requiring flexibility across different
both procedural and object-oriented styles databases, supports only object-oriented style

6. In PHP, what are the differences between the GET and POST methods for sending data to
a server? (2M)
Feature GET POST
Data Placement URL (after ?) HTTP request body
Security Less secure (visible in URL) More secure (hidden)
Data Size Limit Smaller (limited by URL length) Larger
Example Use Cases Search queries, pagination, sorting data Form submissions, login credentials, file uploads

1
Part II: Practical
1. HTML code (02M)
<!DOCTYPE html>
<html lang="en"> (01M)
<head>
<meta charset="UTF‐8">
<meta name="viewport" content="width=device‐width, ini al‐scale=1.0">
< tle>My Web Page</ tle>
</head>

<body> (01M)
<h1>My Web Page</h1>
<p>lorem20.</p>
<img src="h ps://example.com/your‐image.jpg" alt="Descrip on of image">
</body>
</html>

2. CSS snippet to style a paragraph with the id "introduction" (1.5M)


#introduc on {
font‐size: 16px; (0.5M)
color: blue; (0.5M)
background‐color: yellow; (0.5M)
}

3. JavaScript function (03M)


<script>
func on validateForm() {
var ins tute = document.getElementById('ins tute').value; (0.5M)
var department = document.getElementById('department').value; (0.5M)
var isValid = true;
var errorMessage = '';

if (ins tute.trim() === '') { (0.5M)


errorMessage += 'Ins tute field is required.\n'; (0.5M)
isValid = false;
}

if (department.trim() === '') { (0.5M)


errorMessage += 'Department field is required.\n'; (0.5M)
isValid = false;
}

if (!isValid) {
alert(errorMessage);
}

return isValid;
}
</script>

2
4. PHP script that creates a class named "Book" (03M)
<?php
class Book { (01M)
public $ tle;
public $author;
public $price;

public func on __construct($ tle, $author, $price) {


$this‐> tle = $ tle;
$this‐>author = $author;
$this‐>price = $price;
}

public func on display() { (01M)


echo "Title: " . $this‐> tle . "<br>";
echo "Author: " . $this‐>author . "<br>";
echo "Price: $" . $this‐>price . "<br>";
}
}

// Example usage: (01M)


$book1 = new Book("1984", "George Orwell", 9.99);
$book1‐>display();

$book2 = new Book("To Kill a Mockingbird", "Harper Lee", 7.99);


$book2‐>display();
?>

5. Nav bar style


.navBar {
display: flex; (0.5M)
flex‐direc on: row; flex‐wrap: wrap;
jus fy‐content: space‐evenly; (0.5M)
}

6. result :
a = 10 and b = 12 (0.25M)
a = 12 and b = 1 (0.25M)
a = 12 and b = 12 (0.25M)
a = $a++ and b = $b (0.25M)

7. result:
4 (0.5M)
/* echo $a--; will print the current value of $a, which is 4, and then $a will be decremented to 3. */

You might also like