Supplement: C++ Code Example

Example 7-2. C++ Code Fragments: Implementing the Adapter Pattern
class Circle : public Shape {
   .  .  .
  private:
    XXCircle *pxc;
   .  .  .
}
Circle::Circle () {
   .  .  .
   pxc= new XXCircle;
}
void Circle::display () {
   pxc->displayIt();
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.37.129