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

how many moles of lithium nitrate are produced when 0.250 moles of lithium react in this fashion?​
what is the greatest common factor of the terms of the polynomial 12x^4 - 6x^3 + 9x^2​
4. What happens to nitrogen inside of a plant?​
1. What was one way that colonial governments differed from the British government?
when did world war three end​
Does the sentence state a fact or an opinion? People should wait until they are at least eighteen before learning to drive.
Solve the equation for all real solution 4y^2+19y+17=0
All the following are bite registration materials except
Ted is comparing the temperatures of three days in January. The temperatures on Monday and Tuesday were opposites. The temperature on Wednesday was neither posi
julia's hair is 4cm long. Her hair grows 1.5cm per month. Julia wants her hair to grow at least 7cm long. Write an inequality to determine the number of month