class Shape { public: enum EnumType { Circle, Square }; Shape( EnumType type ); void draw(); private: EnumType m_shape_type; };//class Shape void Shape::draw() { switch ( m_shape_type ) { case Circle: //draw a circle... case Square: //draw a square... } }
So why not fake it?
Can't extend hierarchy without disturbing the base class.
This makes maintenance difficult.
All functionality is in one type, so specific functionality has no home:
e.g. where do we put the radius( ) function?
Faking is almost guaranteed to be slower!