Class this is an example from an old cs249a midterm that demonstrates the functor use described in class today. For more information on functors see section 3.9 of the notes. 3. [separating state from processing] We were looking for notifications for onRecording and double-dispatch/visitor pattern for print. Mentioning only one of these methods will get you half points. More specifically, for notifications: class Sensor : public NamedInterface { public: class Notifiee : public BaseNotifiee { virtual void onReconfig(Config *) {} } }; class GpsReactor : public Sensor::Notifiee { public: void onReconfig(Config * config) { /* do something for gps here */ } }; class ImuReactor : public Sensor::Notifiee { public: void onReconfig(Config * config) { /* do something for imu here */ } }; And for double-dispatch/visitor pattern: class Sensor : public NamedInterface { public: void operator( PrintFunctor * f) { f->operator()(this); } }; class PrintFunctor : public NamedInterface { public: virtual void operator()(Gps* ); virtual void operator()(Imu* ); };