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

Which Function is represented by the Graph
Your new motorcycle weighs 2450 N. What is its mass in kilograms? i understand the answer is 250kg because mass times gravity thing but why isn’t the answer ne
Nine subtracted from the product of 8 and a number is at least 20. (X will be used for the unknown number)
Instructions: Point R is the centroid. Find DU if DR = 14.
50 pts: What is the term used to describe the build-up of a higher concentration of H+ on one side of the inner membrane of the mitochondrion than on the other
Which of these words is an irregular verb? A. switch B. shake C. yell D. toggle
Write down the functions of 1.microtubules 2.tripletsof microtubules
ASAP please help meeeeeeeeeeee
Diane bought new headphones originally listed for $70.99. They are 25% off. Which equation can be used to find the amount Diane will save?
Que es la salsa casino? (Por fis no lo pongan tan corto)