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 6=1–2n+5?????
A stockbroker earns a base salary of 40000 dollar plus 5%of the total value of the stocks,mutual funds , and other investments that the stockbroker   sells.last
Which influential work about the Vietnam War was written by Tim O'Brien?
Why do two resistors in parallel together contain less resistance than the same two resistors in series?
Solve for Y xy+y+1=y
Choose the sentence that contains an adjectival prepositional phrase. A. The game begins within an hour. B. The dog ran around the table. C. The shoe store acro
Select the word that best completes the sentence: Poe's stories are often read on Halloween because they _______________ a scary mood.
what is 6 more than 7 times a number is 41
Prove that 3:8 is equivalent to 12:32
45 1/2% as fraction in simplest form