Sie sind auf Seite 1von 6

Faculty of Computer Studies

M275 Web Development Using PHP and MySQL


Tutor Marked Assignment – Fall Semester 2017/2018

Cut-Off Date: TBA Total Marks: 100


Contents
This TMA consists of 3 questions, where you are required to answer all of
the questions. The TMA will be corrected by your tutor and you will be
provided with a proper feedback file to understand your mistakes and avoid
them on the final exam.

Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their
own TMA work and avoid plagiarism. The AOU has implemented
sophisticated techniques for plagiarism detection. You must provide all
references in case you use and quote another person's work in your TMA.
You will be penalized for any act of plagiarism as per the AOU's rules and
regulations.

Declaration of No Plagiarism by Student (to be signed and


submitted by student with TMA work):
I hereby declare that this submitted TMA work is a result of my own efforts
and I have not plagiarized any other person's work. I have provided all
references of information that I have used and quoted in my TMA work.

Name of Student:
Signature:
Date:
Question-1 [20 marks]

XAMPP and WAMP servers are installed by using third-party installation packages:
a- What is meant by third-party installation package? [2 marks]

b- What does XAMPP stand for? [5 marks]

c- What does WAMP stand for? [4 marks]

d- List three differences between XAMPP and WAMP? [9 marks]

Question-2 [50 marks]

In this question you are required to implement a simple transcript calculator by


applying HTML tags and PHP codes. The calculator final code with 2 snapshots
should be provided in your answer sheet.

This calculator has the following specifications:

1- The user changes the initial marks of some or all courses, and then presses
the button 'Calculate the Total and Average', to find out the total, average,
result and the grade of the entered marks.

2- It is assumed that the initial mark of all courses is zero, the initial result
value is empty string and the initial grade value is empty string.

3- The result value is 'PASS' if the average greater than or equal to 50,
otherwise it is 'FAIL'. The grade value is determined according to the scale
below:

A Average ≥ 90

B 80 ≤ Average < 90

C 70 ≤ Average < 80

D 50 ≤ Average < 70

F Average < 50

M275-TMA Page -2- Spring 2017 2018


4- The web page of this calculator, as shown in figure-1, has the following
specifications:

a- 'PHP Simple Transcript Calculator' as the title of this web page.

b- 'Simple Transcript Calculator' as the main header of this web page.

Figure-1: Simple Transcript Calculator with Initial Values

c- M105, M129, M130, M131, M132, Total, Average, Result and Grade as
labels.

d- M105, M129, M130, M131, M132, Total, Average, Result and Grade as
textboxes.

e- 'Calculate the Total and Average' as button name.

f- Courses' labels and their textboxes are located in a separate field set,
and the others are located in a different field set.

M275-TMA Page -3- Spring 2017 2018


Figure-2: Simple Transcript Calculator with Some Values

Figure-3: Simple Transcript Calculator with Some Values

M275-TMA Page -4- Spring 2017 2018


Question-3 [30 marks]

'driver', 'car', 'accident' and 'report' are names of some tables in the insurance
database system. These tables were created by executing the following SQL
creation statements.

CREATE TABLE driver(


driverID INT NOT NULL PRIMARY KEY,
name VARCHAR(30) NOT NULL,
cityAddress VARCHAR(25)
);

CREATE TABLE car(


plateID INT NOT NULL PRIMARY KEY,
model VARCHAR(20) NOT NULL,
year YEAR(4) NOT NULL
);

CREATE TABLE accident(


reportNumber INT NOT NULL PRIMARY KEY,
date Date NOT NULL,
location VARCHAR(20) NOT NULL
);

CREATE TABLE report(


reportNumber INT NOT NULL,
plateID INT NOT NULL,
driverID INT NOT NULL,
damageAmount DOUBLE
);

M275-TMA Page -5- Spring 2017 2018


Based on the previous SQL creation statements, you are required to write each of
the following queries in SQL.

1- List the names of all drivers who live outside neither 'Amman' nor [6 marks]
'Madaba'.

2- List the models of all cars that have even number plateIDs. [6 marks]

3- List the locations of all accidents that happened after December [6 marks]
10, 2015.

4- List the models of all cars which were not involved in any [6 marks]
accident.

5- List the names and addresses of all drivers who were not involved [6 marks]
in any accident.

The End

M275-TMA Page -6- Spring 2017 2018

Das könnte Ihnen auch gefallen