Introduction to OOP Chapter 12: Implications of substitution: next previous audio real text

The Problem with Substitution


class Window {
public:
	virtual void oops();
private:
	int height;
	int width;
};

class TextWindow : public Window {
public:
	virtual void oops();
private:
	char * contents;
	int cursorLocation;
};


	Window x; // how much space to set aside?
	TextWindow y;
	x = y; // what should happen here?










Intro OOP, Chapter 12, Slide 04