universiti malaysia sarawak 94300 kota samarahan …mmc.edu.my/download/questions_bank/soalan...

15
UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia Technology EIGHT & TEN SEMESTER EXAMINATION, 2010/2011 SESSION DMTQ-E-F-3/07, DMTQ-E-F-1/08 MMD2073-WEB BASED MULTIMEDIA DEVELOPMENT AZIZUL AZNI AHMAD ZAINUDDIN 22 FEBRUARY 2011 9.00 AM 11.30 AM (2 ½ hours) INSTRUCTION TO STUDENT 1. This Examination paper has FIFTHTEEN (15) printed pages. 2. This question paper consists of THREE (3) sections. Section A : Answer ALL questions. Section B : Answer ALL questions. Section C : Answer ALL questions. 3. Please write all your answers in the Answer Booklet provided.

Upload: phamminh

Post on 11-Apr-2019

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

UNIVERSITI MALAYSIA SARAWAK

94300 KOTA SAMARAHAN

SARAWAK

FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT

(Faculty of Computer Science & Information Technology)

Diploma in Multimedia Technology

EIGHT & TEN SEMESTER EXAMINATION, 2010/2011 SESSION

DMTQ-E-F-3/07, DMTQ-E-F-1/08

MMD2073-WEB BASED MULTIMEDIA

DEVELOPMENT

AZIZUL AZNI AHMAD ZAINUDDIN

22 FEBRUARY 2011

9.00 AM – 11.30 AM

(2 ½ hours)

INSTRUCTION TO STUDENT

1. This Examination paper has FIFTHTEEN (15) printed pages.

2. This question paper consists of THREE (3) sections.

Section A : Answer ALL questions.

Section B : Answer ALL questions.

Section C : Answer ALL questions.

3. Please write all your answers in the Answer Booklet provided.

Page 2: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 2 of 15

PERATURAN PEPERIKSAAN KOLEJ MULTIMEDIA

PENYELEWENGAN AKADEMIK

1. Pelajar tidak boleh melakukan mana-mana penyelewengan di bidang

akademik seperti berikut atau sebarang arahan peperiksaan yang dikeluarkan

oleh Ketua Pengawas Peperiksaan.

1.1 Pelajar yang meniru hasil kerja orang lain atau tidak

mengiktiraf kerja orang lain (plagiat) untuk tujuan tugasan atau

ujian akan dikenakan tindakan tatatertib.

1.2 Pelajar juga tidak dibenarkan bersubahat dalam peniruan atau

penipuan yang dinyatakan dalam para 1.1.

1.3 Pelajar perlu juga mematuhi peraturan lain mengenai penilaian

yang dinyatakan secara lisan atau bertulis.

HUKUMAN

1. Sekiranya pelajar didapati telah melakukan pelanggaran mana-mana daripada

peraturan peperiksaan ini, setelah dibicara dan sabit kesalahannya, maka

Jawatankuasa Disiplin Pelajar boleh mengambil tindakan dari mana-mana

satu, atau apa-apa kombinasi yang sesuai dari dua atau lebih hukuman-

hukuman berikut:-

(a) Amaran;

(b) Denda tidak melebihi RM500;

(c) sama ada memberi markah '0' kepada peperiksaan akhir bagi mata

pelajaran berkenaan atau memberi markah sifar '0' bagi keseluruhan

keputusan peperiksaan mata pelajaran yang berkenaan. (Termasuk

kerja kursus);

(d) menggantung pengajian pelajar selama tempoh yang difikirkan patut

oleh Jawatankuasa Disiplin;

(e) lain-lain hukuman yang akan ditetapkan oleh Jawatankuasa Disiplin

Pelajar Kolej

2. Pelajar yang melanggar peraturan juga boleh diambil tindakan tatatertib

mengikut peruntukan yang terdapat dalam Peraturan & Tatatertib Pelajar,

MMC,2000.

Dikeluarkan oleh Unit Peperiksaan dan Rekod Pelajar, Kolej Multimedia , Kuala

Lumpur, Julai 2001

Page 3: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 3 of 15

SECTION A : TRUE (T) OR FALSE (F) - (10 marks)

BAHAGIAN A : BETUL (B) ATAU SALAH (S) - (10 markah)

INSTRUCTION : Answer ALL Questions.

ARAHAN : Jawab SEMUA soalan.

1. Setiap penyataan dalam Java mesti di akhiri dengan tanda colon (:).

Every statement in a Java must end with a colon (:).

2. Applet hanya boleh dijalankan di dalam appletviewer sahaja.

An applet can only be run in an appletviewer.

3. Dalam satu applet, nama kelas public mestilah nama fail.

In an applet, the public class name must be the file name.

4. Appletviewer hanya memahami tag <applet> dan menghiraukan tag-tag

lain.

The appletviewer only understand the <applet> tag and ignores other tags.

5. Apabila memuatkan sebuah imej, kelas objek Image mesti diwujudkan

dengan menggunakan kaedah drawImage.

When loading an image, objects of class Image must be created via method

drawImage.

6. JavaScript adalah skrip sebelah pelayan.

JavaScript is a server-side script.

7. Elemen HTML <script> ialah tempat di mana javascript diletakkan.

The HTML element of <script> tag where javascript being put.

Continued…

Page 4: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 4 of 15

8. Untuk melakukan sesuatu untuk setiap elemen dalam sebuah

tatasusunan, penyataan while…next digunakan.

To perform an action for each element in an array, the while…next statement

is used.

9. Kaedah yang betul untuk memaparkan ‘Hello World’ dalam javascript

ialah response.write ("Hello World").

The correct way to display ‘Hello World’ in javascript is response.write

("Hello World").

10. SVG adalah singkatan untuk Scalable Vector Graphics.

SVG stands for Scalable Vector Graphics.

Continued…

Page 5: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 5 of 15

SECTION B : OBJECTIVE QUESTIONS - (20 marks)

BAHAGIAN B : SOALAN OBJEKTIF - (20 markah)

INSTRUCTION : Answer ALL Questions.

ARAHAN : Jawab SEMUA soalan.

1. Arahan yang manakah dapat digunakan untuk menjalankan applet

daripada command line?

Which command can be used to run an applet from command line?

A. appletviewer helloworld.java

B. appletviewer helloworld.html

C. javac helloworld.java

D. appletviewer helloworld

2. Manakah di antara berikut BUKAN “method” yang digunakan di dalam

sesuatu kitaran hidup JApplet?

Which of the following method is NOT a default method in a JApplet life

cycle?

A. init()

B. destroy()

C. thread()

D. start()

3. Semua applet hendaklah di extends daripada superclass __________.

All applets must extends from __________ superclass.

A. JPanel

B. JApplet

C. JGraphic

D. Awt

Continued…

Page 6: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 6 of 15

4. Apakah nilai 20,20 di dalam kod berikut?

What is the value of 20,20 in the following code?

g.drawstring(“Welcome to Java Programming!”,20,20);

A. Width and height

B. Width and position of text

C. x and y coordinate where the text will be drawn

D. y and x coordinate where the text will be drawn

5. Apakah tujuan “import java.awt.Graphics;“ di dalam sesuatu applet?

What is the purpose of “import java.awt.Graphics;“ for an applet?

A. To ensure that the image can be displayed by the applet.

B. To enable the applet to draw graphics, such as lines, rectangles, ovals

and strings of characters.

C. To prepare a drawing canvas in which all graphics element will be

painted.

D. None of the above.

6. Kaedah yang manakah patut digunakan untuk melukis satu baris teks di

dalam applet?

Which method should be used to draw a line of text on an applet?

A. Graphics method writeLine

B. Graphics method drawString

C. Graphics method drawText

D. Graphics method writeText

Continued…

Page 7: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 7 of 15

7. Format imej manakah TIDAK disokong oleh java image library?

Which image format NOT supported by java image library?

A. tiff

B. jpeg

C. png

D. gif

8. Apakah fungsi parseInt?

What is the function of parseInt?

A. Converts string argument to integers

B. Converts integer argument to string

C. to detect whether the argument’s type is integer

D. to detect whether the argument can be converted to integer

9. Yang manakah antara berikut adalah pengishtiharaan pembolehubah

dalam JavaScript?

Which of the following is a variable declaration in JavaScript?

A. Dim counter

B. $counter

C. var counter;

D. int counter;

10. Animasi di dalam Java memerlukan dua (2) langkah iaitu __________.

Animation in Java involve two (2) steps which are ___________.

A. Creating a thread for each frame and ask Java to paint the frame.

B. Load image into an array and load the array into the frame.

C. Load image into frame and start a thread from each frame.

D. Constructing a frame of animation and then asking Java to paint that

frame.

Continued…

Page 8: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 8 of 15

11. Untuk mencetak teks di dalam laman web menggunakan JavaScript,

kaedah _______ boleh digunakan.

To write a string of text on a Web page using JavaScript, the _______ method

is used.

A. document.write()

B. document.print()

C. document.type()

D. window.print()

12. Yang manakah di antara baris kod JavaScript berikut TIDAK akan

menghasilkan kesalahan sintak?

Which of the following lines does NOT create a JavaScript syntax error?

A. var else=3l

B. window.alert(“Cool!”);

C. document.write(“Cool!’);

D. function while()

13. Yang manakah di antara pernyataan berikut akan mencapai elemen ke

lima di dalam sesuatu tatasusunan bernama “aras”?

Which of the following will correctly access the fifth element of an array

named “aras”?

A. aras[5];

B. aras(5);

C. aras[4];

D. aras.array[4];

Continued…

Page 9: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 9 of 15

14. Yang manakah di antara kenyataan berikut mencetak nilai pemboleh

ubah bernama myhobby dengan menambahkan nilai berkenaan bersama

satu set rentetan yang lain?

Which of the following successfully prints a variable named myhobby by

adding it to a set of strings?

A. document.write(“I like to + myhobby + every weekend”)

B. document.write(“I like to “ + myhobby + “ every weekend”)

C. document.write(“I like to myhobby every weekend”)

D. document.write(“I like to ‘myhobby’ every weekend”)

15. Yang manakah di antara perbandingan berikut adalah BENAR?

Which of the following comparisons will return TRUE?

A. 4 != 3

B. 4 == 3

C. 4 < 3

D. 4 <= 3

Soalan 16 dan 17 merujuk kepada kod segmen di bawah.

Question 16 - 17 refers to the program segment below.

var Max = 4, Answer = 10; // At the start of the

var Value = new Array(4); // script, assume that:

for (Loop = 0; Loop <= Max; ++Loop) // Value[0] = 1

{

Answer += Value[Loop]; // Value[1] = 2

} // Value[2] = 3

alert( Answer ); // Value[3] = 4

// Value[4] = 5

Continued…

Page 10: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 10 of 15

16. Yang mana satu di antara berikut ialah tatasusunan numeric (rujuk kod

segmen di atas).

Identify a numeric array.

A. Answer

B. Loup

C. Max

D. Value[]

17. Untuk memastikan tidak berlaku ralat, berapa bilangan minima elemen

bagi tatasusunan di atas?

In order for an error not to occur, how many elements, at least, must that

array have?

A. 0

B. 4

C. 5

D. 15

18. Kenapa penggunaan tag SRC untuk mendapatkan kesan “rollover“ tidak

digalakkan?

Why creating a rollover effect by changing the SRC property of an <img>

with a simple JavaScript statement in an onmouseover event handler is NOT

recommended?

A. Produces a delay in loading the second image.

B. Cannot use more than one image at a time

C. Too much memory will be used and affect the performance.

D. The swapping of the picture is not smooth.

Continued…

Page 11: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 11 of 15

19. Bagaimana untuk membina “rollover” yang lebih efektif?

How to create more effective rollovers?

A. Use more memory.

B. Preload the images.

C. Use smaller size images.

D. None of the above.

20. Yang manakah di antara berikut adalah cara yang betul untuk

memasukkan imej ke dalam sesuatu laman web?

Which of the following is the correct way of adding image into a web page?

A. <a img src=”car.gif” width=”20” height=”20”></a>

B. <href src=”car.gif” width=”20” height=”20”>

C. <href src=”car.gif”>

D. <img src=”car.gif” width=”20” height=”20”>

Continued…

Page 12: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 12 of 15

BAHAGIAN C : SOALAN PENDEK – (70 markah)

SECTION C : SHORT QUESTION – (70 marks)

ARAHAN : Jawab SEMUA soalan.

INSTRUCTION : Answer ALL question

Question / Soalan 1

a) Tuliskan satu program applet mudah yang memaparkan nama dan

nombor IC anda.

Write a simple Java applet program that displays your name and IC number.

(10 marks /markah)

b) Tuliskan fail HTML yang memuatkan applet di atas.

Write an HTML file to include the above applet.

(5 marks /markah)

c) Terangkan dua (2) cara untuk melarikan applet di atas.

Explain two (2) ways to execute the above applet.

(5 marks /markah)

Question / Soalan 2

Answer the following questions:

Tulis jawapan yang bersesuaian untuk tempat kosong di dalam program Java di

bawah

Write suitable answers for the empty code segment in the Java program shown below.

(10 marks /markah)

Continued…

Page 13: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 13 of 15

Question / Soalan 3

a) Tuliskan kod HTML dan JavaScript yang lengkap untuk menghasilkan

kesan ‘rollover’ yang mengubah warna latar belakang dokumen kepada

biru, merah, kuning, hijau dan kelabu.

Write a complete HTML and JavaScript codes to create a rollover effect that

changes the document colour into blue, red, green and grey.

(10 marks /markah)

b) Tuliskan satu program HTML dan JavaScript yang lengkap yang

mempunyai ”rollover” menggunakan teknik ”image preloading”. Anda

dikehendaki menggunakan tatasusunan dan fungsi di dalam program

anda.

Write a complete HTML and JavaScript program that implement image

rollover using the preloading images technique. You are required to use

array and also function for your program.

(15 marks /markah)

Continued…

1 mark

Page 14: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 14 of 15

Question / Soalan 4

a) Tuliskan satu program SVG yang lengkap untuk mendapatkan paparan

seperti di bawah.

Write a SVG program that can display the following output.

(9 marks /markah)

Continued…

Page 15: UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN …mmc.edu.my/download/questions_bank/SOALAN PEPERIKSAAN 2011/WEB...UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI

MMD2073 WEB BASED MULTIMEDIA DEVELOPMENT 22 FEBRUARY 2011

AAAZ Page 15 of 15

b) Tuliskan satu program SVG yang lengkap untuk mendapatkan paparan

seperti di bawah.

Write a SVG program that can display the following output, the text will move

along a path from LEFT to RIGHT. Use information given to accomplish the task.

(6 marks /markah)

End of Pages.

Information:

Left to right for 200 pixels

Use Arial font

Time = 10 seconds