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 did the alliances that formed in Europe after world war 2 form an "iron curtain" as described by Winston Churchill in a 1946 speech?
what is 20% of $45.00?
What does imagery mean
At a store , 24 bottles of water and 6 bags of chips costs $23.40. Five bottles of water and two bags of chips cost $6.60. What is the cost of a single bottle o
y varies directly as x. if x=5 when y=12 find x when y=30
y varies directly as x. if x=5 when y=12 find x when y=30
y varies directly as x. if x=5 when y=12 find x when y=30
Explain why the railroads were not built in a straight line from east to west.
Can someone help me in probability?Amanda wrote a computer program that generates two random numbers between one and eleven.When she runs it,what is the probabi
what is the prefix of enactment?