程序代写代做 html database Java jquery javascript Student ID number: ________________ ____

Student ID number: ________________ ____
Instructions:
Pages : 5 Questions : 20
UNIVERSITY OF TASMANIA EXAMINATIONS FOR DEGREES AND DIPLOMAS Semester 1, 2017
KIT202 Secure Web Programming
Examiners
Soonja Yeom Amanda Lunt
Time allowed: TWO (2) hours Reading Time: FIFTEEN (15) minutes
There are a total of 120 marks available. Answer ALL questions.
Section A contains 16 questions; each question is worth 5 marks. You should spend approximately 80 minutes on this section.
Section B contains 4 questions; each question is worth 10 marks. You should spend approximately 40 minutes on this section.
All answers must be written in the supplied exam booklet, do NOT write your answers on the exam paper.

-2- KIT202 Secure Web Programming
SECTION A
Attempt ALL SIXTEEN (16) questions from Section A. Each question is worth FIVE (5) marks. This section is worth 80 marks and 70% of the examination.
Question 1
Compare absolute referencing and relative referencing with an example.
[5 marks]
Question 2
Which security goal can we achieve by using MD5 or SHA? Briefly explain the goal.
[5 marks]
Question 3
Briefly explain symmetric-key encryption and public-key encryption. What are the different goals that each encryption is aiming at?
Question 4
[5 marks]
[5 marks]
What is the DOM? Why is this important for us when working in the web development environment?
Question 5
What is the difference between projection and selection operations in SQL? Describe the difference briefly with examples.
[5 marks]
Question 6
HTTP operates with ASCII text only. Is this correct or not? Explain your answer.
[5 marks]
Question 7
When creating web sites, separating presentation information from other content is recommended. Explain three different ways of implementing presentation information and their pros and cons. [5 marks]
Question 8
What is the main function of the location header call? Explain it with an example.
[5 marks]
Question 9
Describe two advantages of using the shorthand method of the AJAX function of jQuery. [5 marks]
Question 10
Explain how the SSL security protocol works.
[5 marks]
Continued…

KIT202 Secure Web Programming -3-
Question 11
Briefly describe the POST method used by the web browsers to send user-entered data in HTML form to the server. Compare with the GET method.
[5 marks]
Question 12
PHP provides a large number of functions that can be used to manipulate a MySQL database. Give the names of TWO (2) of these functions and explain briefly
what each of them does.
Question 13
[5 marks]
Write pseudo code for password validation in a form. The password requires 6-8 characters, must contain at least one numeric value, and at least one letter.
Question 14
[5 marks]
[5 marks]
[5 marks]
List four super global variables and provide a brief explanation for each.
Question 15
Explain two advantages and two disadvantages of client-side scripting.
Question 16
What does it mean when a website is accessible? Why are file names of images important in terms of accessibility? Identify two other points you might consider for building an accessible website and suggest how to implement them.
[5 marks]
Continued…

-4- KIT202 Secure Web Programming
SECTION B
Attempt ALL FOUR (4) questions from Section C. Each worth TEN (10) marks each. This section is worth 40 marks and 30% of the examination.
Question 17
There are different “dynamic” concepts in the web environment and its applications.
a. Explain briefly the “dynamic” concept in the tag
b. List two examples of client-side dynamic activities that can be
implemented by JavaScript with CSS
c. Explain the “dynamic” concept as it is applied in server-side scripting
such as PHP programs
d. Compare the dynamic functions of AJAX technology with client-side only
or server-side only dynamic activities.
Question 18
Consider the following HTML form.
[10 marks]
a. Write the HTML code for the above form. The content of this form should be transferred to display.php by the GET method.
b. What will the URL be when the submission is made? Write the relative path based on your form tag codes. Assume that the entered password in the submission is “test123”.
c. Describe how you would authenticate the data entered by the user.
Question 19
The following questions are about “State Management”.
a. HTTP transactions are said to be stateless. What does stateless mean? What weakness is caused by being stateless?
b. session_start() is a PHP function. Briefly explain what this does and where you would expect to see calls to this function.
c. How do programmers store values in the $_SESSION variable? Write code that would do the following:
• Store an element with the key ‘mode’ and the value ‘edit’
• Store an element with the key ‘username’ and the value ‘jsmith’
[10 marks]
Continued…
[10 marks]

KIT202 Secure Web Programming -5-
Question 20
Two-way communication between client and server is a classic model for web sites. However, there is a newer model that uses a technique to download data from a server without reloading your page. What is this technique? Explain how it works, and list all the technologies involved with this technique. What are the problems with web pages we can overcome using this technique?
———– The End ————–
[10 marks]
Continued…