Exam 11: Classes Continued

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

Identify the letter of the choice that best matches the phrase or definition. a.Dependency b.Extension c.Overriding d.Aggregation e.Inheritance -When an object's class is a subclass of a more general class.

Free
(Essay)
4.8/5
(43)
Correct Answer:
Verified

E

In Java, all classes are part of an immense hierarchy, with the class ____________________ at the root.

Free
(Short Answer)
4.8/5
(37)
Correct Answer:
Verified

Object

When information needs to be shared among all instances of a class, that information can be represented in terms of ____________________ variables.

Free
(Short Answer)
4.8/5
(36)
Correct Answer:
Verified

static

It is easier to maintain a program that uses interface types.

(True/False)
4.8/5
(37)

Identify the letter of the choice that best matches the phrase or definition. a.Dependency b.Extension c.Overriding d.Aggregation e.Inheritance -When the subclass method is intended as a replacement of the superclass method.

(Essay)
4.8/5
(33)

An interface is a class.

(True/False)
4.9/5
(39)

An abstract class is one that will not be instantiated. ____________________

(True/False)
4.8/5
(46)

FIGURE 11-1 FIGURE 11-1   -Figure 11-1 above shows an example of a ____ hierarchy. -Figure 11-1 above shows an example of a ____ hierarchy.

(Multiple Choice)
4.9/5
(35)

A subclass often has methods that do not appear in its superclass.

(True/False)
5.0/5
(32)

A class variable belongs to an object and is allocated storage when the object is created.

(True/False)
4.9/5
(39)

Classes that are related by inheritance have a has-a relationship. ____________________

(True/False)
4.7/5
(43)

____ provides a mechanism for reusing code and can reduce the effort required to implement a new class.

(Multiple Choice)
4.9/5
(33)

Identify the letter of the choice that best matches the phrase or definition. a.Dependency b.Extension c.Overriding d.Aggregation e.Inheritance -When an object of one class contains objects of another class as structural components.

(Essay)
4.9/5
(40)

A class method is activated when a message is sent to the class rather than the object. ____________________

(True/False)
4.8/5
(33)

Characteristics common to several classes can be collected in a common abstract subclass. ____________________

(True/False)
4.7/5
(29)

To compare objects for equality, use the ____.

(Multiple Choice)
4.9/5
(38)

The most general type of array is one whose element type is ____.

(Multiple Choice)
4.9/5
(36)

When you declare a variable, it should have a different interface name from the type name.

(True/False)
4.9/5
(48)

One way to enforce preconditions is to ____.

(Multiple Choice)
4.7/5
(31)

In general, a static variable is used in any situation in which all instances share a common data value.

(True/False)
4.8/5
(39)
Showing 1 - 20 of 46
close modal

Filters

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