kayleighanne2330 kayleighanne2330
  • 03-07-2019
  • Computers and Technology
contestada

When an object of one class is a data field within another class, they are related by ____.

a.
composition

b.
extension

c.
is-a

d.
scope

Respuesta :

Branta Branta
  • 11-07-2019

Answer:

a. composition

Explanation:

When an object of one class is a data field in another class, the two classes are related by composition. In particular the containing class is composed using the contained class. For example:

class container {

    contained  c;

    int a;

}

class contained {

    int b;

}

Here the container class is containing an instance of contained class creating a composition relation.

Answer Link

Otras preguntas

which is the main way a representative democracy differs from a direct democracy
Which of these is true of meiosis? a. 2n → n b. n → n c. n → 2n d. 2n → 2n
Which word in the sentence is a predicate nominative? Franklin d. Roosevelt was the only president of the United States to serve three terms. a. president b. on
-x² + 4x - 4 = 0 Solve the equation
What diagram can represent set relationships visually?
a=h(b+c) solve for c
3(a + b) = 3a + 3b is an example of which algebraic property? Distributive Property Associative Property of Addition Commutative Property of Addition Symmet
Reid ate 1/4 if pie, joe ate 1/3 of pie. How much was left after they both ate their pieces
Beneath earths surface, the temperature increases 10 degrees Celsius every kilometer. Suppose That the surface temperature is 22 degrees Celsius, and the temper
Essay about the death penalty