Microsoft
98-361 · Question #377
98-361 Question #377: Real Exam Question with Answer & Explanation
The correct answer is B. class Sphere : Shape. See the full explanation below for the reasoning.
Question
You are creating a new class named Sphere derived from the Shape class. The Shape class has the following code: class Shape { public virtual void Area() { // additional code... } } The Area method in the Shape class should provide new functionality but also hide the Shape class implementation of the Area method. Which code segment should you use to accomplish this?
Options
- Aclass Sphere : Shape
- Bclass Sphere : Shape
- Cclass Sphere : Shape
- Dclass Sphere : Shape
Community Discussion
No community discussion yet for this question.