Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 120-2 Fall 2006 Quiz 5 - Object-Oriented Programming Concepts - Prof. C. Lueer, Quizzes of Computer Science

The questions and answers for quiz 5 of cs 120-2, a fall 2006 course. The quiz covers object-oriented programming concepts such as keywords, access control modifiers, and inheritance. Students are expected to understand the meaning of the 'this' keyword, the purpose of the 'private' access modifier, and how to write the headers of subclasses and interfaces.

Typology: Quizzes

2009/2010

Uploaded on 03/28/2010

koofers-user-8o5
koofers-user-8o5 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Name:_____________________________
Quiz 5
CS 120-2, Fall 2006
1. Which keyword refers to the currently executing object?
this
2. Which access control modifier lets a method or variable be accessed only by the same class that it is
in?
private
3. Write the header of a class named Foo that is a subtype of interface Bar.
public class Foo implements Bar
4. Write the header of a class named Something that is a subtype of class Foo.
public class Something extends Foo
5. The following is a Venn diagram representing the relationship between Foo, Bar, and
Something, as defined above. Label each shape correctly.
inner: Something, middle: Foo, outer: Bar

Partial preview of the text

Download CS 120-2 Fall 2006 Quiz 5 - Object-Oriented Programming Concepts - Prof. C. Lueer and more Quizzes Computer Science in PDF only on Docsity!

Name:_____________________________

Quiz 5

CS 120-2, Fall 2006

  1. Which keyword refers to the currently executing object? this
  2. Which access control modifier lets a method or variable be accessed only by the same class that it is in? private
  3. Write the header of a class named Foo that is a subtype of interface Bar. public class Foo implements Bar
  4. Write the header of a class named Something that is a subtype of class Foo. public class Something extends Foo
  5. The following is a Venn diagram representing the relationship between Foo, Bar, and Something, as defined above. Label each shape correctly. inner: Something, middle: Foo, outer: Bar