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

2x+5x+344x whats the answer
how effective do you find the predictable ,parallel structure of the poem in communicating a message about human nature?support your response with exampled frlm
PLS HELP!!! Instructions: Find the measurement of the angle indicated in the following parallelogram.
What position should a suspected stroke patient be transported in?
A weight (with a mass of 71 kg) is suspended from a point at the right-hand end of a uniform boom with a mass of 33 kg. A horizontal cable at an elevation of 6
What is twenty-one - eighteen?
Crane critical lift plans are required for all of the following except
Pls help. I will offer the brainliest to whoever answers this correctly
Please answer and show work quickly and correctly.
How did the rise of totalitarianism and dictatorship in Europe and Asia lead to ww2 in Europe