text: //: C14:Composition2.cpp
  // From Thinking in C++, 2nd Edition
  // Available at http://www.BruceEckel.com
  // (c) Bruce Eckel 2000
  // Copyright notice in Copyright.txt
  // Private embedded objects
  #include "Useful.h"
  
  class Y {
    int i;
    X x; // Embedded object
  public:
    Y() { i = 0; }
    void f(int ii) { i = ii; x.set(ii); }
    int g() const { return i * x.read(); }
    void permute() { x.permute(); }
  };
  
  int main() {
    Y y;
    y.f(47);
    y.permute();
  } ///:~
  