M257-200906

M257-200906 - M257/F Course Examination 2009 *M2570906*...

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

View Full Document Right Arrow Icon
Copyright © 2009 The Open University M257/F *M2570906* Course Examination 2009 Mathematics and Computing: Level 2 M257 Putting Java to work Wednesday 17 June 2009 2.30 pm – 5.30 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. You are advised not to cross through any work until you have replaced it with another solution to the same question. In Part 2 of the paper, if you submit attempts to more than two questions your best two scores will count towards your result. Write your answers in the answer book(s) provided, starting each question on a new page. Indicate which questions you have attempted for Part 2 in the spaces provided on the front cover of your answer book. 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 together with your signed desk record on top. Fasten them in the top left corner with the round paper fastener. Attach this question paper to the back of the answer books with the flat paper clip.
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/F 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 State and explain the features of the main method header in Java applications with respect to the role of the method as the starting point of a program. [5] Question 2 Java is a strongly typed language. (a) Explain briefly what this term means and (b) give a short code example, involving primitive data types, that would be rejected at compile time as a result of Java’s strong typing. [5] Question 3 (a) To what kind of data does the garbage collection facility apply? (b) Give two advantages of garbage collection. [5]
Background image of page 2
3 [TURN OVER] Question 4 In Figure 1 we have reproduced part of the exception class hierarchy in Java. The letters A, B and C indicate the three main groups of subclasses of Throwable . These may be categorised as: 1 Exceptions that need not be caught or declared. 2 Exceptions that must be caught or declared. 3 Exceptions that should not be caught or declared. RuntimeEx±eption ²bje±t Throwable Eror Ex±eption A B C Figure 1 A Java exception hierarchy (a) Write down which of the letters A, B and C from the diagram belong with which of the numbers 1, 2 and 3 from the list above.
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 / 14

M257-200906 - M257/F Course Examination 2009 *M2570906*...

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