COMP 110 Final Exam Review 3

COMP 110 Final Exam Review 3 - COMP 14-003 Fall 2005 Marcel...

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

View Full Document Right Arrow Icon
COMP 14-003 Fall 2005 Marcel Prastawa Final Exam December 10, 2005 Name: _________________________________________________ No tools (e.g. calculators, laptops, PDAs), notes, or textbooks allowed during the exam. Sign below to indicate that you agree to work on the exam solely using your own efforts and that you agree to uphold the university’s honor code. Signature: _______________________ Notes: There are four sections in this exam, later sections are worth more points. Try to manage your time wisely and avoid spending too much time in the sections with lower amount of possible points. The maximum points you can obtain in this exam is 120 points. For the word problems, write down the steps you take to arrive at your answers to get partial credit. Write down your last name on every page of the exam, so that broken pages will not be lost.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Section 1 (10 points) Indicate whether the sentence or statement is true or false. ____ 1. If the while expression becomes false in the middle of the while loop body, the loop terminates immediately. ____ 2. Statements that might generate an exception are placed in a catch block. ____ 3. A polymorphic reference variable can refer to either an object of their own class or an object of the subclasses inherited from its class. ____ 4. The first step to the problem-solving process is to implement the algorithm in a programming language, such as Java, and verify that the algorithm works. ____ 5. Members of a class consist of packages, methods, and libraries. ____ 6. Reference variables as parameters allow you to return more than one value from a method. ____ 7. All switch structures include default cases. ____ 8. In reality, if you execute an infinite recursive method on a computer it will execute forever. ____ 9. If a Java arithmetic expression has no parentheses, operators are evaluated from left to right. ____ 10. When an array object is instantiated, its components are initialized to their default values.
Background image of page 2
Section 2 (20 points) Identify the letter of the choice that best completes the statement or answers the question. ____ 11. How many constructors can a class have? a. 0 c. 2 b. 1 d. Any number ____ 12. Consider the following definition of a recursive method . public static int mystery(int first, int last)
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 03/31/2009 for the course COMP 110 taught by Professor Qi during the Spring '09 term at Linn Tech.

Page1 / 14

COMP 110 Final Exam Review 3 - COMP 14-003 Fall 2005 Marcel...

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