13. (Class Hierarchies, Brainstorming) Consider the following class hierarchies and Gen/Spec relationships. Which ones are semantically correct,...
Question:
13. (Class Hierarchies, Brainstorming)
Consider the following class hierarchies and Gen/Spec relationships. Which ones are semantically correct, which ones are semantically incorrect and can you model them without the need for class hierarchies (general answers are sufficient)?
a) Base class Lattice, derived classes BinomialLattice and TrinomialLattice.
b) CallOption and PutOption as derived classes of Option.
c) A Square class that is derived from a Rectangle.
d) PDE class hierarchies. How would you design them?
e) The wisdom of inheriting from template classes.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: