title: Program Calculate Area Octagon
signature: class Solution {
  
      public Double programCalculateAreaOctagon(Double side) {
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 );
  }
question_info.extension: java
question_info.entry_fn_name: programCalculateAreaOctagon
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 165794860.15449765, "inputs": {"side": 5859.798616323926}}, {"idx": 1, "outputs": 196612808.27272156, "inputs": {"side": -6381.210375893524}}, {"idx": 2, "outputs": 28799476.852711495, "inputs": {"side": 2442.246292006922}}, {"idx": 3, "outputs": 447291345.3087225, "inputs": {"side": -9624.81536339737}}, {"idx": 4, "outputs": 363738081.5089271, "inputs": {"side": 8679.436805247444}}, {"idx": 5, "outputs": 34739881.027797274, "inputs": {"side": -2682.3245401089525}}, {"idx": 6, "outputs": 251483213.5426547, "inputs": {"side": 7216.9161613024435}}, {"idx": 7, "outputs": 167041618.6125096, "inputs": {"side": -5881.789859815442}}, {"idx": 8, "outputs": 30124010.84898392, "inputs": {"side": 2497.776395789202}}, {"idx": 9, "outputs": 444887003.7391194, "inputs": {"side": -9598.912195459263}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Double side, Double expected){
          try{
              Driver driver = new Driver();
              if (driver.run(side,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(5859.798616323926, 165794860.15449765);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(-6381.210375893524, 196612808.27272156);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(2442.246292006922, 28799476.852711495);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(-9624.81536339737, 447291345.3087225);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(8679.436805247444, 363738081.5089271);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(-2682.3245401089525, 34739881.027797274);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(7216.9161613024435, 251483213.5426547);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(-5881.789859815442, 167041618.6125096);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(2497.776395789202, 30124010.84898392);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(-9598.912195459263, 444887003.7391194);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Double side, Double expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(side),expected);
      }
      
      public boolean validateSolution(Double actual, Double expected){
          return Math.abs(actual - expected) < 1e-09;
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__