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

what is the stranger motivation for pretending to be interested in elisa chrysanthemums
Hey, I need any example how to answer this question? Who is protagonist and what are two characters traits displayed
Which sentence uses an indefinite article? She gave us a picture of her trip to Egypt. That beautiful park is my favorite. Did you enjoy the play
Can someone help me please
What is pie?????????????
Why does jack most likely still piggies glasses. In the lord of the flies
What are civil rights
A new process for removing heavy metals and acid sulfate pollution from mine leachate water is ________. treatment with chlorine or ozone deep-well injection su
1. The organized set of procedures used to solve a problem or answer a question is called the scientific ________. method experiment 2. How many variables are
When z=5, the value of z2+5 is