O'Reilly logo

C# Primer: A Practical Approach by Stanley B. Lippman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.9. Defining a Derived Class

In general, a derived class needs to program only those aspects of its behavior that differ from or extend the behavior of its base class. NotQuery, for example, must provide an eval() definition that implements the not semantics. It must also introduce an instance member to store the query operand it is negating, and a property to allow get and set access to the operand, if appropriate. Both the AndQuery and OrQuery classes must support left and right operands. The NameQuery member must support a string member. All must provide definition of the abstract eval() virtual method.

The derived class is considered abstract if either it introduces an abstract member or it does not provide an implementation for an inherited ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required