// SimpleQuality.h #ifndef SimpleQuality_H #define SimpleQuality_H // SimpleQuality is a concrete subclass of Quality. It is always // valid and uses a double as the measure of quality. Smaller // values are better. // #include "Quality.h" class SimpleQuality : public Quality { private: // attributes // discriminant double _value; private: // attributes // define the type static void* _mytype; private: // methods // return the type void* get_type() const { return _mytype; }; // comparison bool _is_better_than(const Quality& quality) const; public: // constructor SimpleQuality(double value); bool is_valid() const { return true; }; }; #endif