revised: 10/04/03, 10/29/2012

quiz Quiz on Objects

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.

1. What attributes do all real world objects have?

A.    Objects have identity, state, and behavior.

B.    Objects have state and behavior.

C.    Objects have size and weight.

D.    Objects have existence.

Correct Answer:

2. What attributes do all Software objects have?

A.    Software objects have RAM, ROM, and processors.

B.    Software objects have identity, state, and behavior.

C.    Software objects have variables and storage.

D.    Software objects are made of computer components.

Correct Answer:

3. What is the defining characteristic of a von Neumann computer?

A.    RAM is used for data and ROM is used for programs.

B.    It has both a processor chip and memory.

C.    General purpose memory is used to store both programs and data.

D.    It uses general purpose registers for arithmetic.

Correct Answer:

4. When you run a Java application by typing java someClass what is the first method that starts?

A.    The main() method of someClass.

B.    The run() method someClass.

C.    The someClass method.

D.    The applet method.

Correct Answer:

5. What is a class?

A.    A class is a section of computer memory containing objects.

B.    A class is a section of the hard disk reserved for object oriented programs.

C.    A class is the part of an object that contains the variables.

D.    A class is a description of a kind of object.

Correct Answer:

6. What is another name for creating an object?

A.    instantiation

B.    insubordination

C.    initialization

D.    inheritance

Correct Answer:

7. What are the static variables and methods of a class?

A.    Variables and methods that form the foundation of each object of that class.

B.    Variables and methods that belong to all objects in the computer system.

C.    Variables and methods that belong only the objects of that class.

D.    Variables and methods that are part of the class definition, but not of its objects.

Correct Answer:

8. Which of the following invokes the method length() of the object str and stores the result in val?

A.    val = str.length() ;

B.    val = length.str() ;

C.    val = length().str ;

D.    val = length( str ) ;

Correct Answer:

9. How many objects of a given class may be constructed in an application?

A.    Only one per constructor.

B.    As many as the application asks for.

C.    Only one per class.

D.    One object per variable.

Correct Answer:

10. Which of the following is correct?

A.    String alpha("Hello Quiz!") ;

B.    String = "Hello Quiz!" ;

C.    String alpha = new "Hello Quiz!" ;

D.    String alpha = "Hello Quiz!" ;

Correct Answer:

The number you got right:       Percent Correct:       Letter Grade:   

Click here If you have returned here from another page, or have re-loaded this page, you will need to click again on each of your choices for the grading program to work correctly. You may want to press the SHIFT KEY while clicking to clear the old answers.