M257-200806

M257-200806 - M257/E Course Examination 2008 *M2570806*...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright © 2008 The Open University M257/E *M2570806* Course Examination 2008 Mathematics and Computing: Level 2 M257 Putting Java to work Wednesday 18 June 2008 10.00 am – 1.00 pm Time allowed: 3 hours This examination is in TWO parts and you should attempt BOTH parts. Part 1 carries 50% and Part 2 50% of the total examination score. Part 1 This part contains ten questions. You should attempt ALL the questions in Part 1 . Each question is worth 5 marks and the total score for this section is 50 marks. Write your answers in the answer book(s) provided. Part 2 This part contains three questions. You should attempt TWO questions from Part 2 . Each question carries 25 marks and the total score for this section is 50 marks. At the end of the examination Check that you have written your personal identifier and examination number on each answer book used. Failure to do so will mean that your work cannot be identified. Put all your used answer books and your question paper together with your signed desk record on top. Fix them together with the paper fastener provided.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
M257/E 2 Part 1 Answer all the questions in this part of the paper. Where appropriate you may use diagrams and code examples as well as text. Question 1 Give two examples of existing Java editions. Why are there different editions of Java? [5] Question 2 What do we mean by scope when discussing variables in Java? Provide a skeleton code example with comments to compare the scope of an instance variable with the scope of a local variable. [5] Question 3 Explain the process of garbage collection in Java. You should state: (a) What it means; (b) When it takes place; (c) One reason why it’s useful. [5] Question 4 State three circumstances (as opposed to example uses) in which you might want to use Java's exception handling mechanism rather than providing other code to deal with possible errors. [5] Question 5 A stack is a last-in first-out data structure; that is, items are added to and removed from only the top of the structure. Imagine that we wish to write a class implementing a stack, making use of one of the classes in the Java 5 collections framework. Consider each of the following collection types in turn and give your assessment of its suitability for this purpose, giving a brief justification for your answer in each case. (a) ArrayList (b) TreeMap [5]
Background image of page 2
M257/E 3 TURN OVER Question 6 Explain under what circumstances you would want to use each of the following kinds of GUI components. In each case you should also mention a specific scenario in which the component would be appropriate. No code is required. (a) a checkbox (b) radio buttons [5] Question 7 List the steps that you would take when coding an interactive graphical user interface to ensure that clicking an existing button would cause a “hello world” message to be displayed on the screen. No code is required, but you should mention any relevant classes and methods and the order of the steps is important. [5] Question 8 Both the
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/21/2010 for the course UK M257 taught by Professor Maiile during the Spring '10 term at Open Uni..

Page1 / 11

M257-200806 - M257/E Course Examination 2008 *M2570806*...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online