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

Japanese americans have were forced to relocate to guarded camps because they were becoming successful businesspeople. TRUE OR FALSE.
Please help ASAP! BRAINLIEST to best/right answer!!
What is the carbon cycle?
you can buy a newspaper at a
Enzymes and antibiotics have different functions, but both are types of____ A. Lipids B. Proteins C. Carbohydrates
Pleaseee help !!!!!
A continental tropical air mass is _______ and _______.
You manage an ice cream factory that makes two flavors: creamy vanilla and continental mocha. into each quart of creamy vanilla go 2 eggs and 3 cups of cream. i
which best describes the relationship between caesar and octavius
What is the area of this triangle? Enter your answer as a decimal in the box. Round only your final answer to the nearest hundredth.