title: Program Find Slope Line
signature: class Solution {
  
      public Double programFindSlopeLine(Double x1, Double y1, Double x2, Double y2) {
source_py: def program_find_slope_line(x1, y1, x2, y2):
      return (float((y2 - y1)) / (x2 - x1))
source_cpp: float program_find_slope_line(float x1, float y1, float x2, float y2) {
    return ( y2 - y1 ) / ( x2 - x1 );
  }
question_info.extension: java
question_info.entry_fn_name: programFindSlopeLine
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": -0.6486899453998202, "inputs": {"x1": 236.27324548309292, "y1": 5792.493225762838, "x2": 7177.837879115863, "y2": 1289.5700425822731}}, {"idx": 1, "outputs": -0.12115078452752318, "inputs": {"x1": -9201.144918204123, "y1": -2716.3347716140406, "x2": -5161.142121227645, "y2": -3205.784279961129}}, {"idx": 2, "outputs": 0.617204628531244, "inputs": {"x1": 3480.4716834445326, "y1": 3577.9608612055613, "x2": 8611.515262945342, "y2": 6744.864707668983}}, {"idx": 3, "outputs": -0.8320918116165706, "inputs": {"x1": -6915.538971485092, "y1": -4113.601103381095, "x2": -748.3462104020822, "y2": -9245.271700539257}}, {"idx": 4, "outputs": -38.51013687881985, "inputs": {"x1": 8887.97173657486, "y1": 1678.4080012662428, "x2": 8709.574949883017, "y2": 8548.492675510739}}, {"idx": 5, "outputs": -0.6052307962095809, "inputs": {"x1": -3785.5177159369946, "y1": -3084.67461899163, "x2": -7415.76208254121, "y2": -887.5389305564152}}, {"idx": 6, "outputs": -0.7142746798007333, "inputs": {"x1": 3037.6696554256832, "y1": 4432.445827549, "x2": 8387.304165588026, "y2": 611.3373507518394}}, {"idx": 7, "outputs": 0.9387777514963889, "inputs": {"x1": -7925.458496016523, "y1": -3350.27411882042, "x2": -5619.767086756504, "y2": -1185.7423219907591}}, {"idx": 8, "outputs": -4.2964732392719505, "inputs": {"x1": 1404.2919985268031, "y1": 8971.636233373416, "x2": 3039.112051378511, "y2": 1947.6756252708972}}, {"idx": 9, "outputs": 2.85002783720527, "inputs": {"x1": -4748.744241168378, "y1": -675.557388148954, "x2": -5998.241086029875, "y2": -4236.658178504375}}]
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 x1, Double y1, Double x2, Double y2, Double expected){
          try{
              Driver driver = new Driver();
              if (driver.run(x1, y1, x2, y2,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(236.27324548309292, 5792.493225762838, 7177.837879115863, 1289.5700425822731, -0.6486899453998202);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(-9201.144918204123, -2716.3347716140406, -5161.142121227645, -3205.784279961129, -0.12115078452752318);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(3480.4716834445326, 3577.9608612055613, 8611.515262945342, 6744.864707668983, 0.617204628531244);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(-6915.538971485092, -4113.601103381095, -748.3462104020822, -9245.271700539257, -0.8320918116165706);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(8887.97173657486, 1678.4080012662428, 8709.574949883017, 8548.492675510739, -38.51013687881985);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(-3785.5177159369946, -3084.67461899163, -7415.76208254121, -887.5389305564152, -0.6052307962095809);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(3037.6696554256832, 4432.445827549, 8387.304165588026, 611.3373507518394, -0.7142746798007333);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(-7925.458496016523, -3350.27411882042, -5619.767086756504, -1185.7423219907591, 0.9387777514963889);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(1404.2919985268031, 8971.636233373416, 3039.112051378511, 1947.6756252708972, -4.2964732392719505);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(-4748.744241168378, -675.557388148954, -5998.241086029875, -4236.658178504375, 2.85002783720527);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Double x1, Double y1, Double x2, Double y2, Double expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x1, y1, x2, y2),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__