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 equation for five times the smaller of three consecutive even integers is 10 more than twice the largest.
Which is/are important aspects of human culture
What specific area of business communications presents ethical questions by sometimes containing false and misleading messages for adults and especially childre
Number 1 A to D and number 2 A to C....?
Accumulation of undigested molecules would most directly be an indication of _____ dysfunction.
9909.937 to 2 decimal place
Two ad agencies want to understand issues that are important to students. Agency A will interview 50 students whose names are randomly chosen from school enroll
How many significant figures are in the number 0.002849?
What happened to hycinthus after he died?
Choose elements that classify the iroquois constitution as a primary-source document.