etvalue (string msg) snmpver msg = msg; getvalue ( ) class newClient public: string version; string msg; public: setvalue() getvalue ( ) cout<<"Version: "<<version<<endl; cout << "Message: "<<msg<<endl; class adapter : public newClient public: setvalue (server_msq *obj) version = (obj->snmpver_msg).substr (0,2); msg = (obj->smpver_msg) substr (3, (obj->snmpver_ msg) length ()) getvalue ( ) cout<< "Version: "<<version<<endl; cout. "Message: "<<msg<<endl; Fundamentals of EMS, NMS and OSS/BSS "D:\desktop_08_09\refer\DesignPatterns\Adapter\Debug\Adapter.exe" Version: v2 Message: Test Message Press any key to continue Figure 33.5 Output obtained on executing adapter program. void main () server_msq *serv = new server msq ( ) i serv->setvalue ("v2 Test Message") ; adapter *adp = new adapter ( ) i adp->setvalue (serv) ; adp->getvalue ( ) i now adp output can be used to set newClient object delete serv; delete adp; // Output of the adapter program is shown in Figure 33.5. 33.7 Iterator Design Pattern Overview: This pattern is used to iterate through a list. Most programming lan- guages have standard implementation of the iterator pattern. For example, C++ iterator refines the iterator design pattern into a specific set of behaviors for STL (Standard Template Library). There is also an iterator interface in Java for working with containers like list and vector. Example of usage in telecom management programming: Data items in management applications are usually stored in containers provided by the spe- cific programming language used in development. To iterate through the items in the container, the iterator design pattern can be used. The data items can OSS Design Patterns be attributes of the elements or the list of elements stored in a hash, stack, or queue. Implementation: // Iterator Design Pattern // ver0.0 Jithesh Sathyan Aug 08, 2009 #include <iostream> #include <vector> #include <string> using namespace std; class employee public: string name; string dept; employee (string n, string d) name = n; dept = d; employe