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

Simplify. Right answer will be given brainliest. :) (Ignore the option I have chosen, I accidently clicked on an answer before I took a screenshot)
An incident when you felt completely helpless but were saved at the last moment essay
• All plants used were the same height •Two groups: •Group A: given 30ml of distilled water for 7 days • Group B: given 30ml of water containing .1 gram
What will the next line of this equation look like: 3(4x - 5) = -21
A visit to the hospital 300 word​
would love some help
Next you will write a paragraph about the effects of new technologies on industrialization in the Gilded Age. Check the ones you think are important. The Bessem
Plz answer.............
What do terenty, fyokla and Danilka have in common?
Please help please please help me help please