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

What decimal is represented by this expanded form? 4 x 10,000 + 5 x 1,000 + 7 x 100 + 8 x 1/100 + 6 x 1/1000
If you are startled by the sound of a loud explosion, the _______________ nervous system will become dominant.
How can a plasmid be described?
in 1810, Napoleon had signed alliance with Prussia, the Austrian empire, and the Russian empire. what countries shown on the map were not allied with Napoleon o
What is the discriminant D of the equation? n^2+2n−2=0 D= ___
15) PLEASE HELP WITH QUESTION. MARKING BRAINLIEST + POINTS.
What issue is increasingly important as the average age of Americans increases? the rising divorce rate illegal immigration drug arrests funding for Social Secu
What is the reason reason why stimulants can cause restlessness and hyperactivity
The lion king the kingdom transfer of Denmark into
After the Republic of Texas formed, a it borrowed large sums to get the funds it needed. b it created a force to protect its border against raids.