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

The theme of Sandburg's poem "Grass" is A. war. B. freedom. C. peace. D. forgetfulness.
Oraciones con asi que
Which of the following is the primary function of certification? a. To enforce mandatory government regulations b. To give credit to a facility that meets certa
What was the role of Ulysses s. Grant in ending reconstruction
What is the whole number of 7/2?
Nationalism is to pride in one's national identity as a _______ is to a group of people who share a common identity, a sense of unity, and a desire for self-gov
Are 55:100 and 66:120 equal
a pizza parlor has 8 different toppings and 3 different cheeses to choose from on the menu. how many pizza combinations are possible if each pizza has 1 toppin
which do you think would be warmer on a winter day when there is no wind a thick forest or a grassy field? explain your answer
The only haploid cells in an organism are _____. parent cells gametes homologous