ion to perform a set of pre- defined actions. This can be easily implemented using observer pattern where the OSS modules can register for a specific event and will get notified when the event occurs. Implementation: // Observer Design Pattern // ver0.0 Jithesh Sathyan Aug 01, 2009 #include <iostream.h> class Observer // Add constructor :-) public: int flag_set; virtual void update ( ) } *obsr [3] i // Would suggest to store the observers in a vector // SO that we don't have to keep track of number of observers class Subject // Add constructor :-) Fundamentals of EMS, NMS and OSS/BSS public: void registerObserver (Observer * o) void removeObserver (Observer * o); void notifyObserver ( ) ; class Database public Subject public: void registerObserver (Observer* x) x->flag_set = 1; void removeObserver (Observer* x) x->flag_set = 0; void notifyObserver () for (int j=0; j<3; j++) if (obsr :[j]->flag_set == 1) obsr[j]->update (); void editRecord () notifyObserver() ; class Administrator : public Observer void update () cout<<"Administrator got notified"<<endl; class Programmer : public Observer void update () cout<<"Programmer got notified"<<endl; OSS Design Patterns class Engineer: public Observer void update () cout<<"Engineer got notified"<<endl. void main () Database * database = new Database (); Administrator administrator; Programmer programmer; Engineer engineer; // Upcasted pointers obsr[0] = &administrator; obsr [1] = &programmer; obsr [2] = &engineer; database->registerObserver (&administrator) ; database->registerObserver (&programmer) ; database->registerObserver (&engineer) ; cout<<"Administrator, Programmer and Engineer Registered"<<endl; database->editRecord( ; database->removeObserver (&programmer) ; cout<<endl<<"Programmer Removed"<<endl database->editRecord( ; // Output of the observer program is shown in Figure 33.3. "D:\desktop_08_09\refer\DesignPatterns\Observer\Debug\observer.exe" Administrator, Programmer and Engineer Registered Administrator got notified Programmer got notified Engineer got notif