[go: up one dir, main page]

0% found this document useful (0 votes)
153 views5 pages

CSE 301 - Final - Assignmen

The document outlines the assignment rubric for a Web Programming course final exam with 4 questions. Question 1 involves defining HTML, CSS, JavaScript, PHP roles and GET/POST purposes. Question 2 is a PHP script to calculate max, min, average of 4 numbers from a POST form. Question 3 generates an Italian Fiscal Code from personal data. Question 4 inserts dashes between even numbers in a number input. Marks are awarded based on completeness and accuracy of the responses.
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)
153 views5 pages

CSE 301 - Final - Assignmen

The document outlines the assignment rubric for a Web Programming course final exam with 4 questions. Question 1 involves defining HTML, CSS, JavaScript, PHP roles and GET/POST purposes. Question 2 is a PHP script to calculate max, min, average of 4 numbers from a POST form. Question 3 generates an Italian Fiscal Code from personal data. Question 4 inserts dashes between even numbers in a number input. Marks are awarded based on completeness and accuracy of the responses.
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/ 5

MZC 183DA

Green University of Bangladesh


Department of Computer Science and Engineering
Final Exam Assignment with rubrics, Fall 2020
Course Code: CSE 302 Course Title: Web Programing
Full Marks: 20

1. Define the roles of HTML, CSS, JavaScript and PHP in a website? Explain the purpose of
GET and POST in PHP with examples. [CO1] [5 Marks]

Marks Level Descriptions

5 Excellent Properly defined the roles of all 4 of HTML, CSS, Javascript


and PHP in a website and the purpose of all 2 of GET and POST
with proper example.

4 Very Good Properly defined the roles of 3 of HTML, CSS, Javascript and
PHP in a website. The others were missing or incorrect. One of
the purpose of GET or POST isn’t well defined.

3 Good Properly defined the roles of 2 of HTML, CSS, Javascript and


PHP in a website and the purpose of 1 of GET and POST with
proper example. The others were missing or incorrect.

2 Average Properly defined the roles of 1 of HTML, CSS, Javascript and


PHP in a website and poorly defined the purpose of GET and
Post. The others were missing or incorrect.

1 Poor Only one of the roles of HTML, CSS, JavaScript and PHP is
defined properly.

2. Write a PHP script which takes four numbers as inputs using a POST request in an
HTML form and prints the maximum number, minimum number and the average.
[CO2] [5 marks]

Marks Level Descriptions

5 Excellent The program can take 4 numbers as inputs using POST request
and prints the maximum number, minimum number and the
average.
MZC 183DA

4 Very Good The program can take 4 numbers as inputs using POST request
and prints 2 of maximum number, minimum number and the
average.

3 Good The program can take 4 numbers as inputs using POST request
and prints 1 of maximum number, minimum number and the
average.

2 Average The program can take 4 numbers as inputs using POST request.

1 Poor The program can take at least one number as inputs using POST
request.

3. Each person in Italy has a unique identifying ID code issued by the national tax
office after the birth registration: The Fiscal Code (Codice Fiscale). [CO3] [5 Marks]

Given a JavaScript object containing the personal data of a person (name, surname,
gender
and date of birth) return the 11 code characters as a string following these steps:

 Generate 3 capital letters from the surname, if it has:

o At least 3 consonants then the first three consonants are used. (Newman -
> NWM).
o Less than 3 consonants then vowels will replace missing characters in the
same order they appear (Fox -> FXO | Hope -> HPO).
o Less than three letters then "X" will take the third slot after the consonant
and the vowel (Yu -> YUX).
 Generate 3 capital letters from the name, if it has:
o Exactly 3 consonants then consonants are used in the order they appear
(Matt -> MTT).
o More than 3 consonants then first, third and fourth consonant are used
(Samantha -> SNT | Thomas -> TMS).
o Less than 3 consonants then vowels will replace missing characters in the
same order they appear (Bob -> BBO | Paula -> PLA).
o Less than three letters then "X" will take the the third slot after the
consonant and the vowel (Al -> LAX).
 Generate 2 numbers, 1 letter and 2 numbers from date of birth and gender:
o Take the last two digits of the year of birth (1985 -> 85).
o Generate a letter corresponding to the month of birth (January -> A |
December -> T) using the table for conversion included in the code.
o For males take the day of birth adding one zero at the start if is less than 10
(any 9th day -> 09 | any 20th day -> 20).
MZC 183DA

o For females take the day of birth and sum 40 to it (any 9th day -> 49 | any
20th day -> 60).

Examples
fiscalCode({
name: "Matt",
surname: "Edabit",
gender: "M",
dob: "1/1/1900"
}) ➞ "DBTMTT00A01"

fiscalCode({
name: "Helen",
surname: "Yu",
gender: "F",
dob: "1/12/1950"
}) ➞ "YUXHLN50T41"

fiscalCode({
name: "Mickey",
surname: "Mouse",
gender: "M",
dob: "16/1/1928"
}) ➞ "MSOMKY28A16"

Notes
• Code letters must be uppercase.
• Date of birth is given in D/M/YYYY format.
Write a JavaScrpit program to print the fiscal code.
MZC 183DA

Marks Level Descriptions

5 Excellent The program accurately prints the fiscal code based on the
provided object.

4 Very Good The program prints the fiscal code with one minor logical
mistake.

3 Good The program prints the fiscal code with two logical errors.

2 Average The program can process the object but exhibits the completely
wrong fiscal code.

1 Poor The program can take the object as input only.

4. Write a JavaScript program which accept a number as input and insert dashes (-) between
each two even numbers. For example, if you accept 025468 the output should be 0-254-
6-8. [CO3] [5 Marks]

Marks Level Descriptions

5 Excellent The program can take input through prompt and print the exact
formatted output.

4 Very Good The program can take input from prompt but contains one
minor error in the code.

3 Good The program can take input from prompt but contains several
minor logical errors in the code.

2 Average The program can take input through prompt but contain major
mistakes in the code.

1 Poor The program can take input using prompt.


MZC 183DA

You might also like