(comp101)[2007](sum)final~masze^_10102

(comp101)[2007](sum)final~masze^_10102 - For each of the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: For each of the questions 1 to 30, please use a pencil to fill in the circle on the answer sheet that represents the best answer (2 points for each question). 1. Which of the file graphical contents? A. B. C. D. 2. can be used for .mid .mp3 .swf .wav 8 x 24 x 44000 bytes 60 x 24 x 44000 x 2 bytes 8 x 60 x 24 x 44000 / (1.5 x 220) bytes 8 x 60 x 24 x 44000 x 2 / (1.5 x 220) bytes The three basic constructs of a computer program are A. B. C. D. 4. below How do we estimate the file size of an 8 min song without compression, recording in stereo, 24-bit at a sample rate of 44 kHz, for streaming using bandwidth of 1.5 Mbps? A. B. C. D. 3. formats array, function and statement choice, loop and sequence function, loop and sequence keyword, special term and variable What will the button look like when it is defined as below in HTML? <input type="submit" value="click me!!" name="don't click me" onclick="alert('comp101')"> A. B. C. D. 5. A special characteristic of the ADSL connection is: A. Download speed and upload speed are set depending on the application. B. Download speed is faster than upload speed. C. Download speed will be the same as upload speed. D. Upload speed is faster than download speed. 2 6. What would be the output of the following JavaScript segment if placed within a <script> tag in the <body> section? function difference(a, b) { var result = a + b; return result; } var total = difference(24,13); document.write(total); A. B. C. D. 7. Which one of the following formats of compression is the best for recording a speech? A. B. C. D. 8. 11 37 difference(24,13); total audio .mid .mp3 .svg .swf According to the "fair use" guideline, one may upload music without seeking permission from copyright owner as long as proper credits are given for A. B. C. D. up up up up to to to to 10% 10% 30% 30% or or or or 30 30 10 10 seconds, seconds, seconds, seconds, whichever whichever whichever whichever is is is is less. more. less. more. 9. A "plug-in" is usually refers to A. a hardware adapter to connect the new device with an existing computer. B. a program that compresses some contents to a file in a particular format. C. a program that decompresses some file to recover the original contents. D. a software adapter to let the browser handle new content formats. 3 10. Which compression technique is likely to allow full recovery of original contents when decompressed? A. B. C. D. Averaging Range reduction Removing repetition Selectivity 11. The "selectivity" compression following strategy: A. leave out noticed B. leave out data C. select the D. select the technique uses the the details that are not likely to be the inappropriate range when digitizing best CODEC for the task most effective format to store the file 12. If your personal website contains some copyrighted material without permission, what is likely to happen if the copyright’s owner finds out but you ignore the request to remove the material immediately? A. B. C. D. Your computer may be infected by a virus. You may be imprisoned for copyright violations. You may be subjected to a civil penalty. You may be subjected to disciplinary action from the university. 13. At which stage of the algorithm determined? A. B. C. D. process is the Compilation Debugging Design Testing 14. Which name? A. B. C. D. programming of following is a good_name good-name good name 9oodname 4 valid JavaScript variable 15. Which of the following JavaScript output the word "hello" exactly once? segments would I. var i = 0; if (i < 3) document.writeln("hello"); II. var j = 0; while (j < 3) { document.writeln("hello"); j++; } III. var k; for (k = 0; k < 3; k = 3) { document.writeln("hello"); } A. B. C. D. None of the above. I only I and III only I, II and III 16. The proper use of the "alt" attribute for the "<img>" element is a ________ solution to narrow the digital divide. A. B. C. D. alternative policy resource technology 17. Which of the following compression formats is most suitable for Internet and mobile video? A. B. C. D. MPEG-1 MPEG-2 MPEG-3 MPEG-4 18. You are given a 6-minute video at 30 frames per second, where each frame is 320 x 240 pixels with 24bit color. How much bandwidth is needed for smooth presentation of the video using streaming technology without compression? A. B. C. D. 320 320 320 320 x x x x 240 240 240 240 x x x x 24 24 24 24 x x x x 30 30 30 30 / / x x 1000 Kbps 8 / 1000 Kbps 6 x 60 / 1000 Kbps 6 x 60 / 8 / 1000 Kbps 5 19. Which of XHTML? the following code segments is valid in A. <a onclick="javascript:window.alert('hi');"> <img src="hi.jpg" alt="hi" width="200" height="50"> </a> B. <a onclick="javascript:window.alert('hi');"> <img src="hi.jpg" alt="hi" /> </a> C. <a onMouseOut="javascript:window.alert('hi');"> hello </a> D. <a onmouseover="javascript:window.alert('hi');"> <img src="hi.jpg" width="200" height="50" /> </a> 20. Which of the following is NOT considered a high level programming language? A. B. C. D. Assembly language Basic Fortran Java 21. Which of the following file formats does not support animation? A. B. C. D. .gif .jpg .ppt .swf 22. Which of the following MPEG formats is not a video format? A. B. C. D. MPEG-1 MPEG-2 MPEG-4 MPEG-7 23. Which of the following actions is not a violation of copyright for some commercial software? A. Adapt the software for another application. B. Allow people to download the software from your website and give credit to the source. C. Make a copy of the software for your friend. D. Promote the software on your website. 6 24. What does a sample rate of 44.1KHz for an audio file mean? A. 44.1K samples are taken for each second of the sound recorded. B. The audio file contains only samples of sound of frequency 44.1 KHz. C. The audio file is a 44.1-second long sample of some music. D. The audio file is a recording of sound of frequency at most 44.1 KHz. 25. Which of the following statements about Flash is NOT correct? A. A Flash movie is made up of one to many frames. B. Flash will take care of the intermediate transformations between key frames. C. To create an animation in Flash, you have to specify the position, side and shape of the objects in different key frames. D. You cannot add audio effect in Flash. 26. Which of the following is NOT an advantage of using a Content Management System (CMS)? A. Create, edit and publish contents on a website easily. B. Enhance website outlook by adapting a welldesigned website template. C. Facilitate easy content security control. D. There is no more need to worry about the storage problem in the FTP server. 27. When editing a movie in Microsoft Movie Maker, if we find a movie clip too long and we do NOT want to show the first 30 seconds of it, what should we do at time=30s of that clip? A. B. C. D. Add fade out effect. Set end trim point. Set start trim point. Split the movie clip into two clips. 7 28. Consider the following HTML code segment: <embed src="comp101.wav" width="100" height="50"> Which of the following statements are true? I. II. The HTML code segment is not valid HTML. The HTML code segment is valid HTML but not valid XHTML. We can play the music file "comp101.wav" in Internet Explorer if it is able to locate the file and a proper plug-in is installed in the computer. III. A. B. C. D. I only III only I and III only II and III only 29. When using Flash MX, we want to change the appearance of the text (produced using Text Tool in Flash) as time goes on, from frame 1 as shown below in the left to frame 15 as shown below in the right. What should be the effects/functions we need to use? I. II. III. IV. A. B. C. D. II I, II I, Break Apart Flip Horizontal Motion Tween Shape Tween and III only II and III only and IV only II and IV only 8 30. If we are to put a Flash movie "cpegkay.swf" inside the XHTML file "my_flash.html" and the 2 files would be located in the same folder. Which of the following XHTML segments should be put inside the "my_flash.html" so that it can show the Flash movie successfully in the web page in Internet Explorer, while the webpage remains valid XHTML? A . B . C . D . <embed src="cpegkay.swf" quality="high" bgcolor="#ffffff" width="320" height="240" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/xshockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> <flash src="cpegkay.swf" quality="high" bgcolor="#ffffff" width="320" height="240" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/xshockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="flash" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="cpegkay.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> </object> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="flash" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="cpegkay.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="cpegkay.swf" quality="high" bgcolor="#ffffff" width="320" height="240" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/xshockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> 9 For question 31-38, space provided. please provide the answer in the 31. (3 points) According to the "fair use" guidelines, calculate the maximum size (in seconds) of the following items that you can copy to your own computer and show them on your webpage. a. A song found on the Web which is 60 seconds long. ___________________________________________________ b. A video clip found on the Web which is 50 minutes long. ___________________________________________________ c. A 90 seconds song composed and performed by you. ___________________________________________________ 32. (3 points) During the lab about CMS-Joomla, after you installed the Component MediaSlide in your Joomla website in iHome, you created a few albums and put photos into the albums. You could view the thumbnails of the photos in the albums, but when you click on one of the thumbnails to try to see a clearer picture, you got the "Internal Server Error" message. In order to view the clearer picture, what file access rights should you grant to the file "\cgi-bin\components\com_mediaslide\viewer.php" in such a case? Please put a tick to the appropriate box below. Read Owner Group All Users (Public) 10 Write Execute 33. (4 points) Suppose you are using Joomla and created several Content Items as shown below: For the 8 content items shown above, which will appear in the Front Page, assuming that configured the Front Page to display at content items? Please put a tick to each correct answers. Introduction My Friends Favorites Courses Chelsea Man Utd Real Madrid Juventus 11 have of them we have most 8 of the 34. (6 points) Please fill in the appropriate HTML or JavaScript code such that the web page will look like this: Also, the code should achieve the effect that when the user clicks on the button marked as "Last Modified Date", the last modified date of the webpage will appear in the text box. Make sure the code would be W3C valid, too. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>COMP101 Summer 2007 Final Q.34</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" method="post" action=""> <p><input type="_________________________" name="lmd" value="_________________________" onClick="javascript: document.___________.___________.value = document._________________________; return false;"> <input type="_________________________" name="result"></p> </form> </body> </html> 12 35. (6 points) Please write the missing HTML or JavaScript code in the spaces provided to produce the described effect. Make sure the code segment would be W3C valid HTML 4.01. a. <a ____________="javascript:window.___________='Hello';"> Display the word Hello in the status bar when the mouse is moved out of here.</a> b. <a __________="javascript:document._________='#0000FF';"> Change the background colour to blue after a single click (cannot use the href attribute).</a> c. <a ___________="javascript:window.__________('Hello');"> Show the word Hello in a pop-up window when the mouse is moved over here.</a> 36. (5 points) Suppose we want to show the video with the name "comp101.wmv" in a Windows Media Player plug-in inside a XHMTL page. Assuming the video will be put to in the same folder as the webpage, please fill in the code below for the part of the code responsible for the video. Make sure the code segment would be W3C valid, too. <______________ classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1" width="330" height="310"> <______________ name="URL" value="______________" /> <______________ name="autoStart" value="0" /> <______________> 13 37. (8 points) Consider the following HTML code segment: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>COMP101 2007 Final Q.36</title> </head> <body> <p><script type="text/javascript"> var i = window.prompt("Ricky", "Your name is :"); document.writeln("Your name is "+i); </script></p> <p style="text-align: right;">Goodbye</p> </body> </html> a. When you just enter the page in Internet Explorer, an "Explorer User Prompt" window will pop up. Please draw what it would look like in the window below: b. Suppose after that, you enter "Ricky Lau" in the white box replacing any content originally there (if any), please draw the effect in the window below after clicking the "OK" button: 14 38. (5 points) segment: Consider the following JavaScript code var num = new Array(5); var i; num[0] = 0; for (i = 1; i < 5; i++) num[i] = i + 2 * num[i-1]; What should be the values in the array running the above code segment? num[0] = __________ num[1] = __________ num[2] = __________ num[3] = __________ num[4] = __________ 15 num after ...
View Full Document

Ask a homework question - tutors are online