MichealM2433 MichealM2433
  • 21-04-2022
  • Computers and Technology
contestada

A program has a class Potato , which is derived from the class Vegetable , which is derived from the class Food . This is an example of _______

Respuesta :

KennyOliver
KennyOliver KennyOliver
  • 21-04-2022
Inheritance

If you have a potato, it has the features/characteristics of a vegetable
A potato is healthy, and it gets this from being a vegetable
A vegetable gets its features/characteristics from food
A vegetable can be eaten, just like food
We can then say that a vegetable inherits the ability to be eaten from food
And that the potato inherits this from being a vegetable
The potato class inherits from the vegetable class the healthiness, but the vegetable class doesn’t inherit healthiness from the food class
Answer Link

Otras preguntas

A 32.1 mole sample of gas has a temperature of 21 Celsius and a pressure of 2280.0 torr. What is the volume of the gas?
I need help finding this answer
Semejanzas entre el cuento de la tinta roja, el retrato oval y el mensajero de la muerte (de los libros de sexto grado págs. 59,60, 61, 64, 65) plis ayuda
Solve the system, or show that it has no solution. 10x + 4y = 14 15x + 6y = 21
Fire properties of low E glass
According to cisco, what was considered the inflection point for the internet of things?
mendel’s law of segregation states that the two alleles for each gene separate during gamete formation. during which stage of meiosis do the alleles separate?
find the sum of all multiples of 6 between 1 and 100.​
the assassination of which leader led to the outbreak of world war i?
AIDE MOI with correct answers sit the plait