#ifndef PROPERTY_H #define PROPERTY_H #include #include #include #include "common.h" BEGIN_ESTATE_NAMESPACE /** * Represents a property for sale * * Note that this example is slightly * different the one from the previous lecture */ class Property { public: static int getCount(); Property(int price = 0); Property(const Property& old); virtual ~Property(); void adjustPrice(int new_price); int getPrice(); // Pay special attention to the following new member function // Notice the keyword "virtual". // Notice the = 0 virtual float getValue() = 0; string toString(); // New member function virtual string toString2() { return toString(); } protected: // Note: we have changed access mode from private int _id; int _price; private: // Will be inaccessible from derived classes static int s_count; }; END_ESTATE_NAMESPACE #endif