sq ( ) 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; employee (const employee& pt) name = pt.name; dept = pt.dept; employee& operator= (const employee& ptx) name = ptx.name; dept = ptx.dept; return *this; class Division private: string dept; vector<employee> V; vector<employee>: : iterator itrv; Division (string n) dept = n; Fundamentals of EMS, NMS and OSS/BSS add (string emp) V push_back (employee (emp, dept) ; displayDetails () for (itrv = v.begin(); itry != v.end() ; itrv++) cout<<"Name : "<<itrv->name<<" "<<"Section: "<< itrv->dept<<endl; cout<< " "<<endl; void main ( ) Division *d1 = new Division ("Management") d1->add ("Dan") ; d1->add ("Phil") ; d1->add ("Steve") i d1->displayDetails( ; Division *d2 = new Division ("Techie") ; d2->add("Mary") ; d2->add ("Rick") ; d