Instructions:
(a) This paper has a total of FOURTEEN pages including the covering page.
(b) This paper contains TWO Sections.
(c) Section A is WORTH 40 marks and Section B
is WORTH 60 marks.
(d) Section A contains FOUR questions. Answer
ALL questions in Section A.
(e) Section B contains THREE questions.
Answer ALL questions in Section B.
(f) NO CALCULATOR IS ALLOWED.
Note:The result of this assessment will not be
counted if you do not meet the minimum attendance requirement (if any) governed by the general academic regulations of your programme/course unless approval of the campus principal has been granted.
MODULE TITLE:
INTERNET & MULTIMEDIA APPLICATIONS DEVELOPMENT
MODULE CODE: ITP4513
IVE Information Technology
Information & Communications Technology
&
Multimedia & Entertainment Technology
Programme Boards
HIGHER DIPLOMA IN
SOFTWARE ENGINEERING
(IT114105)
SEMESTER THREE MAIN EXAMINATION
24 JULY, 2019
1:30 PM TO 3:30 PM (2 hours)
© Vocational Training Council
Information Technology Discipline Programme/Year: IT114105/1
Page 1 of 13
This paper contains TWO sections.
Section A (40 marks)
This section contains FOUR questions. Answer ALL questions.
A1 You are given the following PHP script A1a.php.
Line
1.
2.
3.
4.
5.
6.
7.
8.
9.
(a) (b)
(c)
File: A1a.php
The PHP script A1b.php should produce the following execution output (Figure A1).
IQ. 127.0.0.1/A1b.php
The original string: reverse
The reversed string: esrever Figure A1
Implement the function reverse which reverses the order of the characters in a given string. You are not allowed to use the PHP built-in function strrev(). Hint : $s[$pos] will return the character at position $pos of the string $s. [5 marks]
File: A1b.php
[3 marks] output of A1a.php. [2 marks]
Write the execution output of A1a.php.
At line no. 5, after the keyword continue is replaced by break, write the execution
Line
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
“; $newStr = reverse($string);
echo “The reversed string: $newStr”;
?>
Internet & Multimedia Applications Development (ITP4513) Main Examination Semester 3 (2018/2019)
© Vocational Training Council
Information Technology Discipline Programme/Year: IT114105/1
A2
You are required to develop a PHP program A2.php which must meet the following functional requirements. [10 marks]
In Figure A2a, if nothing is entered in the textbox, it should show a message “Please enter your name.” when the form is submitted.
In Figure A2b, if the text “Chan Tai Man” is entered in the textbox, it should show a message which contains the textbox input when the form is submitted.
(_B• IQ. 127.0.O.1/A2.php?name=Chan+Tai+Mar Name:[ l
ISubmit ~
Hello Chan Tai Man 1t
Figure A2b Write the missing code for parts (a) to (f) in file A2.php below.
File: A2.php