title: Check Line Passes Origin
signature: class Solution {
  
      public Boolean checkLinePassesOrigin(Integer x1, Integer y1, Integer x2, Integer y2) {
source_py: def check_line_passes_origin(x1, y1, x2, y2):
      return ((x1 * (y2 - y1)) == (y1 * (x2 - x1)))
source_cpp: bool check_line_passes_origin(int x1, int y1, int x2, int y2) {
    return ( x1 * ( y2 - y1 ) == y1 * ( x2 - x1 ) );
  }
question_info.extension: java
question_info.entry_fn_name: checkLinePassesOrigin
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"x1": 1, "y1": 28, "x2": 2, "y2": 56}}, {"idx": 1, "outputs": true, "inputs": {"x1": 10, "y1": 0, "x2": 20, "y2": 0}}, {"idx": 2, "outputs": true, "inputs": {"x1": 0, "y1": 1, "x2": 0, "y2": 17}}, {"idx": 3, "outputs": true, "inputs": {"x1": 1, "y1": 1, "x2": 10, "y2": 10}}, {"idx": 4, "outputs": false, "inputs": {"x1": 82, "y1": 86, "x2": 19, "y2": 4}}, {"idx": 5, "outputs": false, "inputs": {"x1": 78, "y1": 86, "x2": 11, "y2": 6}}, {"idx": 6, "outputs": false, "inputs": {"x1": 13, "y1": 46, "x2": 33, "y2": 33}}, {"idx": 7, "outputs": false, "inputs": {"x1": 18, "y1": 29, "x2": 95, "y2": 12}}, {"idx": 8, "outputs": false, "inputs": {"x1": 42, "y1": 35, "x2": 25, "y2": 36}}, {"idx": 9, "outputs": false, "inputs": {"x1": 29, "y1": 17, "x2": 45, "y2": 35}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer x1, Integer y1, Integer x2, Integer y2, Boolean 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(1, 28, 2, 56, true);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(10, 0, 20, 0, true);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(0, 1, 0, 17, true);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(1, 1, 10, 10, true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(82, 86, 19, 4, false);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(78, 86, 11, 6, false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(13, 46, 33, 33, false);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(18, 29, 95, 12, false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(42, 35, 25, 36, false);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(29, 17, 45, 35, false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer x1, Integer y1, Integer x2, Integer y2, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x1, y1, x2, y2),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // 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__