Exam 3: A First Look at Classes and Objects

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Class objects normally have __________ that perform useful operations on their data, but primitive variables do not.

(Multiple Choice)
4.8/5
(36)

The term "no-arg constructor" is applied to any constructor that does not accept arguments.

(True/False)
4.8/5
(43)

After the header, the body of the method appears inside a set of

(Multiple Choice)
4.9/5
(37)

A method that gets a value from a class's field but does not change it is known as a mutator method.

(True/False)
4.9/5
(33)

What is the following statement an example of? import java.util.Scanner;

(Multiple Choice)
4.8/5
(36)

For the following code, which statement is not true? public class Sphere { Private double radius; Public double x; Private double y; Private double z; }

(Multiple Choice)
4.8/5
(35)

The key word new

(Multiple Choice)
4.8/5
(40)

What is the following statement an example of? import java.util.*;

(Multiple Choice)
4.7/5
(40)

The java.lang package is automatically imported into all Java programs.

(True/False)
4.8/5
(39)

Another term for an object of a class is a(n)

(Multiple Choice)
4.7/5
(34)

If you do not provide initialization values for a class's numeric fields, they will

(Multiple Choice)
4.9/5
(46)

The public access specifier for a field indicates that the field may not be accessed by statements outside the class.

(True/False)
4.7/5
(30)

When a local variable in an instance method has the same name as an instance field, the instance field hides the local variable.

(True/False)
4.9/5
(37)

Using the blueprint/house analogy, you can think of a class as a blueprint that describes a house and __________ as instances of the house built from the blueprint.

(Multiple Choice)
4.7/5
(27)

To indicate the data type of a variable in a UML diagram you specify

(Multiple Choice)
4.7/5
(40)

An access specifier indicates how a class may be accessed.

(True/False)
4.8/5
(41)

A constructor

(Multiple Choice)
4.7/5
(38)

For the following code, which statement is not true? public class Circle { Private double radius; Public double x; Private double y; }

(Multiple Choice)
4.7/5
(34)

One or more objects may be created from a(n)

(Multiple Choice)
4.8/5
(33)

UML diagrams do not contain

(Multiple Choice)
4.8/5
(34)
Showing 21 - 40 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)