Java programmer:<p><pre><code>  class FactorialCommand(object):
      def set_num(self, num):
          self.__num = num

      def get_num(self):
          return self.__num

      def execute(self):
          result = 1
          i = 2
          while i &#60;= self.get_num():
              result = result * i
              i = i + 1
          return result

  cmd = FactorialCommand()
  cmd.set_num(6)
  print cmd.execute()</code></pre>