Student ID No:                                       

Pages: 8

Questions: 20



UNIVERSITY OF TASMANIA


EXAMINATIONS FOR DEGREES AND DIPLOMAS

June 2019


KIT502 Web Development

First and Only Paper

Ordinary Examination


Examiner: Dr Soonja Yeom


Time Allowed: TWO (2) hours

Reading Time: FIFTEEN (15) minutes


Instructions:

There is a total of 120 marks available. Attempt ALL questions of both Section A and Section B.


SECTION A

Attempt ALL questions from Section A. Each question is worth 5 marks. Answers to each question should around FIVE (5) written lines in length. This section is worth 80 marks, or 70% of the examination.

Question 1 (addresses ILO 1)

Provide a simple definition of protocol. Explain two relevant protocols from the unit with their main roles.

[5 marks]

Question 2 (addresses ILO 4)

Describe one advantage and one problematic point of using shorthand method with an example.

[5 marks]

Question 3 (addresses ILO 3)

What is the main security goal of sending a message encrypted with a Symmetric algorithm? Compare with the Asymmetric algorithm.

[5 marks]

Question 4 (addresses ILO 3)

What is the problem that public key algorithm can’t be assured of? Explain it. What are you going to suggest for solving the situation out?

[5 marks]

Question 5 (addresses ILO 1)

Below is an example of the data structure of a database table. Describe any problems you can see and explain how you will improve it in PHP.

[5 marks]

Question 6 (addresses ILO 1)

Describe what primary key and foreign key are with an example.

[5 marks]

Question 7 (addresses ILO 3)

What is an SQL injection? Explain with a simple example and suggest a solution.

[5 marks]

Question 8 (addresses ILO 3)

What do you think about the statement below? Do you agree with it or not? Briefly explain your answer.

Statement: If we combine different hash functions, it makes the message digest (hash) stronger and securer. For example, md5(sh1(password)) or sha1(str_rot13(password + salt)).

[5 marks]

Question 9 (addresses ILO 1)

Explain what variables are and how to use it in PHP with possible rules.

[5 marks]

Question 10 (addresses ILO 2)

What is the output of the following code?

[5 marks]

Question 11 (addresses ILO 4)

What is the output of the following fragment of PHP code?

[5 marks]

Question 12 (addresses ILO 4)

What is the reason for using trim() or strip_tag() in PHP? Explain your answer.

[5 marks]

Question 13 (addresses ILO 1)

Describe the functions of the PHP coding below.

[5 marks]

Question 14 (addresses ILO 3)

What is the salt and hash? What is the main purpose of using it? Explain your answer.

[5 marks]

Question 15 (addresses ILO 3)

If a user is shopping from a website, how and where do you record what is currently in his shopping basket, and how do you manage the state? Explain your answer with important feature of HTTP.

[5 marks]

Question 16 (addresses ILO 1)

There are two ways of dealing with an error when querying database tables: preprocessing and postprocessing. Describe the difference and explain why it is important to know it.

[5 marks]

SECTION B

Attempt ALL questions from Section B. Each question is worth 10 marks. This section is worth 40 marks, or 30% of the examination.

Question 17 (addresses ILO 1)

What is the output of the coding below?

You may correct or improve any part, if you wish. You may have assumptions.

[10 marks]

Question 18 (addresses ILO 4)

Please fill in two missing parts, (1) and (2).

[10 marks]

Question 19 (addresses ILO 4)

Show the output of coding below. You may correct any part of the coding, if you wish. You may have assumptions.

[10 marks]

Question 20 (addresses ILO 3)

A notice board for comments is available for users. If anybody wants to highjack the users to their own sites, it could be done when the programmer is not paying attention carefully.

This is a coding produced:

Is there any potential problem with this coding and a form design? Describe any possible problems if user types the code in below:

50% off!! Click this <br>

<a href="./hacked.html"><img src="./sale.jpg" alt="50%off"/></a>

Explain your answer with an example.

[10 marks]



End of Examination