M257-200810

M257-200810 - M257/K Course Examination 2008 *M2570810*...

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

View Full Document Right Arrow Icon
Copyright © 2008 The Open University M257/K *M2570810* Course Examination 2008 Mathematics and Computing: Level 2 M257 Putting Java to work Friday 10 October 2008 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
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 What is meant by a version of Java and what is meant by an edition of Java? Compare and contrast these two terms, naming examples of each. [5] Question 2 Two kinds of iteration in Java are a for-loop and a for-each loop. Explain the difference between these two kinds of iteration, giving an example of when you would use a for-loop and an example of when you would use a for-each loop. No code is required. [5] Question 3 Where does the class Object fit in the Java class hierarchy? Give two advantages of the placement of Object in the class hierarchy. [5] Question 4 Explain the concept of a stream in Java, including the difference between buffered and unbuffered streams and why you might want to flush a stream. [5] Question 5 Most object-oriented systems will require a mixture of composition and inheritance. (i) Give brief definitions of the terms composition and inheritance . (ii) Suppose that we have classes with names Car , CarRadio and FordCar . What relationships would these classes most likely have with each other
Background image of page 2
Image of page 3
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 / 12

M257-200810 - M257/K Course Examination 2008 *M2570810*...

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

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