title: C++ Composition Constructor
body: <p>So I've got a program with classes Car, Route and Taxi. I'm using composition in order to obtain the data from the classes Car and Route. Each class needs to be able to enter data on it's own and the data entered to be checked. I'm having difficulties with how to make the constructor of the Taxi class the way that he uses and checks the data with the get/set methods of the classes Car and Route.
  How to access the parameters in the <code>setRouteTaxidata</code> method?</p>
  
  <p>Any suggestions?</p>
  
  <pre><code>class RouteTaxi {
      private:
          int id;
      public:
          Car car;
          Route route;    
          RouteTaxi();
          ~RouteTaxi();
          void setRouteTaxidata(string cbrand, string cmodel, int cyears, int cseatingCapacity, double cloadCapacity, double cfuelConsumption,string rnodes, double rrouteLength, int rtoursPerDay, int i);
  
  
  };
  
  RouteTaxi::RouteTaxi(){
      setRouteTaxidata(??)   ??????
  }
  
  void RouteTaxi::setRouteTaxidata(string cbrand, string cmodel, int cyears, int cseatingCapacity, double cloadCapacity, double cfuelConsumption, string rnodes, double rrouteLength, int rtoursPerDay, int i){
      car.setBrand(cbrand);
  
  }
  </code></pre>