{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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.
Image of page 1

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

View Full Document Right 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]
Image of page 2
M257/F 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. 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.
Image of page 3

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern