Introduction to OOP: Chapter 11: Replacement and Refinement [next] [previous] [audio] [real] [text]

Replacement in C++ - class descriptions

class CardPile {
public:
	...
	virtual int canTake(Card *);
	...
};

class SuitPile : public CardPile {
public:
	...
	virtual int canTake(Card *);
	...
};
Intro OOP, Chapter 11, Slide 8