Exam 3: A First Look at Classes and Objects

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

A class's responsibilities include

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

C

In the blueprint/house analogy, think of a class as a blueprint that describes a house and ________ as instances of the house built from the blueprint.

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

C

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

Free
(True/False)
4.9/5
(30)
Correct Answer:
Verified

True

A group of related classes is called a(n)

(Multiple Choice)
4.9/5
(39)

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

(True/False)
4.9/5
(40)

What does the following UML diagram entry mean? + setHeight(h : double) : void

(Multiple Choice)
4.9/5
(33)

A constructor is a method that

(Multiple Choice)
4.8/5
(32)

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

(True/False)
4.8/5
(37)

In UML diagrams, what symbol indicates that a member is public?

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.7/5
(30)

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

(Multiple Choice)
4.8/5
(43)

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

(Multiple Choice)
4.7/5
(31)

A method that stores a value in a class's field or in some other way changed the value of a field is known as a mutator method.

(True/False)
4.8/5
(38)

You should not define a class field that is dependent upon the values of other class fields

(Multiple Choice)
4.7/5
(33)

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

(Multiple Choice)
4.9/5
(38)

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.8/5
(25)

A method

(Multiple Choice)
5.0/5
(40)

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
(46)

The term "default constructor" is applied to the first constructor written by the author of the class.

(True/False)
4.8/5
(46)

When an object is created, the attributes associated with the object are called

(Multiple Choice)
4.7/5
(39)
Showing 1 - 20 of 40
close modal

Filters

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