As many as I sent.
This chapter develops a hierarchy of greeting cards.
The parent class is
and its children classes are
A card object will have a
greeting() method that writes out a greeting.
Each type of card contains an appropriate greeting.
The Holiday card says "Season's Greetings."
The Birthday card says "Happy Birthday."
The Valentine cards says "Love and Kisses."
In this example,
an object must be an instance of one of the three child types:
There will never be an object that is merely a "Card."
Card class represents the abstract concept of "Card."
All actual card objects must be more specific.
If you had a shoe box full of greeting cards you had received over the years — Valentine cards, birthday cards, holiday cards, and so on — what would be a good label to write on the box?