nerdexam
Microsoft

98-361 · Question #167

Two classes named Circle and Square inherit from the Shape class. Circle and Square both inherit Area from the Shape class, but each computes Area differently. Which term is used to describe this…

The correct answer is C. polymorphism. You can use polymorphism to in two basic steps: - Create a class hierarchy in which each specific shape class derives from a common base class. - Use a virtual method to invoke the appropriate method on any derived class through a single call to the base class method.

Understanding Object-Oriented Programming

Question

Two classes named Circle and Square inherit from the Shape class. Circle and Square both inherit Area from the Shape class, but each computes Area differently. Which term is used to describe this object-oriented concept?

Options

  • AEncapsulation
  • BSuperclassing
  • Cpolymorphism
  • Doverloading

How the community answered

(62 responses)
  • A
    2% (1)
  • B
    10% (6)
  • C
    82% (51)
  • D
    6% (4)

Explanation

You can use polymorphism to in two basic steps: - Create a class hierarchy in which each specific shape class derives from a common base class. - Use a virtual method to invoke the appropriate method on any derived class through a single call to the base class method.

Topics

#polymorphism#method overriding#inheritance#OOP concepts

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice