title: storing fixed known data in classes (c++)
body: <p>I have this class to store fixed known data. Each object should have its own unique id in such way that, when the user calls <code>Belt belt(1)</code>, an object with the correct values of <code>name</code>, <code>perimeter</code>, <code>nOfPoints</code> is created. Is there any better way to define these other parameters without a switch-case? Should I design this in another way? What are the disadvantages of such implementation?</p>
  <pre class="lang-cpp prettyprint-override"><code>class Belt {
      private:
          int _id;
          std::string _name;
          int _perimeter;
          int _nOfPoints;
      public:
          Belt(int id){
              _id = id;
              switch (id)
              {
              case 1:
                  _name = &quot;NEO&quot;;
                  _perimeter = 100;
                  _nOfPoints = 10;
                  break;
              case 2:
                  _name = &quot;PED&quot;;
                  _perimeter = 200;
                  _nOfPoints = 12;
                  break;
              case 3:
                  _name = &quot;ADT&quot;;
                  _perimeter = 400;
                  _nOfPoints = 20;
                  break;
              }
          }
  };
  
  </code></pre>