Recall that we need to implement algebraic structures
like: ring, commutative ring, euclidean domain, field, ...
Moreover we want to say that an euclidean domain is a commutative ring.
Hence we want INHERITANCE BETWEEN
INTERFACES.
Of course we need also INHERITANCE BETWEEN
CONCRETE CLASSES.
For instance:
- A prime finite field
is a particular
ring of modular integers (whose characteristic is a prime).
Hence its implementation should inherit from that
of the modular integer ring
(where
is not necessarily a prime).
- A multivariate polynomial ring
is a particular univariate polynomial ring
.
Hence its implementation should be able to reuse
that of a generic univariate polynomial ring.
Marc Moreno Maza
2008-01-07