98-361 question 25 discussion

answered

The Dog class and the Cat class inherit from the Animal class. The Animal class includes a
breathe() method and a speak() method. If the speak() method is called from an object of
type Dog, the result is a bark. If the speak() method is called from an object of type Cat, the
result is a meow.
Which term is used to describe this object-oriented concept?

  • A. multiple inheritance
  • B. polymorphism
  • C. data hiding
  • D. encapsulation
Created 4 months, 1 week ago by darjack2

darjack2

Is this answer correct? A? I thought is should be polymorphism and the explanation supports B. polymorphism

uday.cool19

I am sure the correct option should be B and the explanation provided backs my point.

dolli3coutur3

But what is the answer on the exam? Did whoever add this question not highlight the correct answer?

EverestM

B is definitely correct. C# doesn't support Multiple Inheritance and I am assuming this is the C# version of the test.

alexsan

This is wrong, the correct answer is B. C# don't support multiple inheritance.

harigovind511

How is the answer B shouldn't the answer be C data hiding?

AdamSeebeck

The answer should be B as others have stated.

rezg1980

A

vinalk

One method used differently.. Answer is B