#include <iostream>


class Multiplier
{
   const int mFactor1;
   const int mFactor2;
   static void initializationLogic (int & a, int & b, const int c )
   {
       a = c * 5;
       b = a * 2;
    }
  public:
   Multiplier (const int & value1, const int & value2)
     : mFactor1(value1), mFactor2(value2)
     {};
   /*
   //this constructor doesn't initialize the const members
   Multiplier (const int & value)
     {
        initializationLogic(mFactor1,mFactor2, value);
     };
    */
   static Multiplier getMultiplierInstance (const int & value)
   {
       int f1, f2;
       initializationLogic(f1,f2, value);
       Multiplier obj(f1,f2);
       return obj;
   }
     
  int multiply1(int value) const
  {
     return mFactor1 * value;
  }
  
     
};

int main() 
{
   Multiplier myObj(2,3);
   std::cout << myObj.multiply1(3);
   Multiplier anotherObj = Multiplier::getMultiplierInstance(1);
   std::cout << anotherObj.multiply1(3);
   return 0;
}