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

Which concern does this advertising raise?
2(3y+6)−3(−4−y) simplified
The reason for the dramatic decline in the number of measles cases from the 1960s to 2010 in the United States was because the vaccine
The profile of the cables on a suspension bridge may be modeled by a parabola. The central span of the bridge is 1210 m long and 128 m high. The parabola y equa
What is a parallel narrative?
Lexington Company sells product 1976NLC for $20 per unit. The cost of one unit of 1976NLC is $18, and the replacement cost is $17. The estimated cost to dispose
HELP ME PLEASE REALLY IMPORTANT OR ILL GET IN TROUBLE!! WILL MARK AS BRAINLEST IF YOU GET IT CORRECT!!
Can I get help :-) thanks
Given the following sequence, find the 12th term: {2, -4, 8,...} -4096 4096 2048 -2048
if 3x+2y=72 and y=3x, then x whoever solve I give them all my points