title: Program Calculate Area Octagon
signature: function program_calculate_area_octagon(side)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return abs(actual - expected) < 1e-09
  end
  
  function driver(side, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(side), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(5859.798616323926, 165794860.15449765);
      @printf("TEST-0...%s\n",result);
      
      result = driver(-6381.210375893524, 196612808.27272156);
      @printf("TEST-1...%s\n",result);
      
      result = driver(2442.246292006922, 28799476.852711495);
      @printf("TEST-2...%s\n",result);
      
      result = driver(-9624.81536339737, 447291345.3087225);
      @printf("TEST-3...%s\n",result);
      
      result = driver(8679.436805247444, 363738081.5089271);
      @printf("TEST-4...%s\n",result);
      
      result = driver(-2682.3245401089525, 34739881.027797274);
      @printf("TEST-5...%s\n",result);
      
      result = driver(7216.9161613024435, 251483213.5426547);
      @printf("TEST-6...%s\n",result);
      
      result = driver(-5881.789859815442, 167041618.6125096);
      @printf("TEST-7...%s\n",result);
      
      result = driver(2497.776395789202, 30124010.84898392);
      @printf("TEST-8...%s\n",result);
      
      result = driver(-9598.912195459263, 444887003.7391194);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def program_calculate_area_octagon(side):
      return (((2 * (1 + math.sqrt(2))) * side) * side)
source_cpp: double program_calculate_area_octagon(double side) {
    return ( float ) ( 2 * ( 1 + sqrt ( 2 ) ) * side * side );
  }