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

Describe the conditions prevailing during holocaust with reference to the diary of a young girl or Anne Frank.
What is America's measurement system called? Imperial, SAE, USC?
Anyone? Anybody know the answer at all?!
The term for the mental process of sorting out, interpreting, analyzing, and integrating stimuli from the sense organs and brain is ______________.
economic achievements of the golden age of islam
A patient is prescribed ophthalmic corticosteroids. what eye disorder may result from long-term use of ophthalmic corticosteroids?
What's the 3rd law of motion ?
You are invited to take part in a study by a researcher trying to replicate the work of hermann ebbinghaus. what might this researcher ask you to do?
If a cone has a volume of 113.04 cubic meters and a radius of 3 meters, what is the height of the cone?
A patient has a class ii classification of obesity. what level of health risk does this pose for the patient?