CSc 110 - Final - Spring 1998

CSc 110 - Final - Spring 1998 - University of Victoria...

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

View Full Document Right Arrow Icon
University of Victoria Practice Final Examination Computer Science 110 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Time 3 hours Instructor Dr. H.A. Müller Instructions All questions are to be answered on these pages This exam consists of eleven pages including one cover page and contains seventeen questions worth a total of 100 marks. The number of marks assigned to each question is shown in square brackets. Make sure that you attempt every question. Rough work can be done on the empty back pages. Please check to be sure that you have received a complete exam. This is a closed-books, closed-notes, no calculators exam. Your Name Your U Vic Id Your Signature
Background image of page 1

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

View Full DocumentRight Arrow Icon
1 10 2 4 3 4 4 4 5 4 6 6 7 4 8 6 9 8 Subtotal- 1 50 10 4 11 4 12 6 13 8 14 6 15 8 16 6 17 8 Subtotal- 2 50 Subtotal-1 50 Subtotal-2 50 Total 100 1. For the following questions argue convincingly why the statement is true or false. a. The following Java constructs are syntactically correct and semantically equivalent. [1%] for (;;) ; while (true) ; b. If no access modifier is specified for a particular data field or method of a Java class, then the entire package has access to this field. [1%] c. Abstract classes cannot be instantiated. [1%] d. A Java class can have more than one constructor. [1%]
Background image of page 2
e. The return type of a constructor in Java is always int. [1%] f. A Java class cannot inherit from multiple base classes. [1%] g. Every object in Java is referred to using a reference. [1%] h. A subclass does not inherit the constructor from its superclass. [1%] i. The keyword super is used to return to the caller of a method quickly. [1%] j. The instance variables of a class should be declared public . [1%] 2. What are the principal tasks of a constructor? [4%] 3. Declare a two dimensional array object where the components of the array are of type double and the dimensions are 3 and 9. [4%] 4. Declare a syntactically correct
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.

Page1 / 7

CSc 110 - Final - Spring 1998 - University of Victoria...

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