mid08f - CS1MD3 Midterm 2008 Page 1 Name Student Number...

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

View Full Document Right Arrow Icon
CS1MD3 Midterm 2008 Page 1 Name Student Number Instructor: S. Qiao CS1MD3 Day Class Duration of examination: 50 minutes McMaster University Midterm Examination October 2008 This examination paper includes 3 pages and 14 questions. You are responsible for ensuring that your copy of the paper is complete. Bring any discrepancy to the attention of your invigilator. SPECIAL INSTRUCTIONS: This paper must be returned with your answers. Use of McMaster standard (Casio-FX991) calculator only is allowed. 1. (2 marks) An algorithm must satisfy the three criteria: unambiguous, e±ective, and fnite . 2. (4 marks) The three important attributes of a variable are name, type , and value . 3. (4 marks) import acm.program.*; public class HelloConsole extends ConsoleProgram { public void run() { println("hello, world"); } } From the above program, ConsoleProgram is a subclass of Program class; ConsoleProgram is a superclass of HelloConsole class. 4. (2 marks) Suppose that
Background image of page 1

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

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

Page1 / 3

mid08f - CS1MD3 Midterm 2008 Page 1 Name Student Number...

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

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