Faculty of Computer Studies Course Code: M150A Course Title: DATA, - TopicsExpress



          

Faculty of Computer Studies Course Code: M150A Course Title: DATA, COMPUTING and INFORMATION - A Tutor Marked Assignment Cut-Off Date: Sunday 4`th of May 2014 Total Marks: Question1: (20 marks) 1. Computers can be used as a tool of finding in the sense of geographical location. GPS is the U.S. space-based global navigation satellite system. Based on your knowledge, answer the following questions. (6 marks) a. What GPS stands for? (1 mark ) b. How does this system work? (2 marks) c. What are the advantages of GPS (2 marks) d. Give examples of applications for GPS (1 mark ) 2. The process of crossing the boundary from analogy world to computer`s digital world called encoding. (6 marks) a. Briefly explain the main two steps for the encoding process. (2 marks) b. Find and explain encoding technique for visual information. (1 mark ) c. Find and explain encoding technique for sound information. (1 mark ) d. Why it is impossible to make a perfect digital coding? (2 marks) 3. Compare between the following terms by definitions. (5 marks) a. Lossless compression vs. Loosy compression (1 mark) b. Software vs. Firmware (1 mark) c. RAM vs. ROM (1 mark) d. Compilation vs. Interpretation (1 mark) e. Supercomputer vs. Supercluster (1 mark) 4. Draw the diagram for each of the 3 different instructions` execution mechanisms in most programming languages (3 marks) 3 Question 2: (20 marks) 1. For the given numbers find their equivalent in each specified base. Show your steps. (12 marks) Decimal Binary Octal Hexadecimal 38 1000001011 1253 2A8 2. Use truth table to verify and prove the Boolean expressions X AND (X OR Y) X (4 mark) X Y (X OR Y) X AND (X OR Y) 3. Consider a 3-hour film to be displayed on a computer at 24 fps. Each frame is 720 x 230 pixels and a 24-bit RGB colour encoding is being used. How many bytes will be required to represent the whole film? (4 mark) Question3: (20 marks) 1. Explain with an example the difference between the following JavaScript errors. (3 marks) Syntax error Semantic error 2. What output does the following script produce? (3 marks) var a = 3; var b = 6; a += 4; b *= 2; document.write(a + + b + ); a++; b--; document.write(a + + b + ); a = 6; b = 3; a /= b; document.write(a + + b + ); 4 3. Consider the following structure: (4 marks) a. Does the above structure involve selection, repetition or both? b. Specify the Boolean expression(s) in the given structure. c. What is the exact output for the following values of temperature: 16, 27 and 45? d. Draw a flowchart for the above structure. 4. The following flowchart diagram shows a loop structure program. (10 marks) Read the temperature if (the temperature is less than 15) write ‘The weather is very cold’ else if (the temperature is less than 25) write ‘The weather is nice’ else write ‘The weather is hot’ go to a new line write ‘Thank you’ START Input Low (1), High (10) Count = Low Print Count STOP Y is Count High N Count = Count +1 5 a. How many times will the loop be executed? b. What is the exact output after these instructions have been executed? Use and draw trace table c. What will be the output if the condition “Count High is replaced by “Count High? Explain your answer. Question4: (20 marks) 1. Write JavaScript code equivalent to the structure given in Question 3 part (3). Insert a screenshot showing the resulted output when the three temperature values entered. (8 marks) 2. Write a JavaScript program that converts a person’s age to “dog years”. Folk wisdom says a person’s age in dog years is their normal age multiplied by 7, so a 10-year-old person would be 70 years old in dog years. The script should prompt the user for their age, and then print out a message about how old that person would be in dog years. If the age someone types in is less than zero, then tell the user they made a mistake and don’t do the conversion. (You don’t need to ask them to type in their age again; they only get once chance.) (12 marks) a. Run your program with print out a message about how old that person would be in dog years. b. insert two screenshots: One showing the program prompting the user for their age. One showing the result if the age someone types in is less than zero. Important note: In your answers to question4, you should follow good programming style that helps readability. This includes: • Using short comment at the beginning stating the purpose of your program • Using spacing and indentations to help make the structure of your program clear. • Following the M150 style guidelines when choosing names for the variables (Refer to section 2.2 of unit 7 page 16)
Posted on: Wed, 12 Mar 2014 09:48:55 +0000

Trending Topics



Recently Viewed Topics




© 2015