code: public static void main(String[] args) {
      Interval1D<Integer> a = new Interval1D<>(15, 20);
      Interval1D<Integer> b = new Interval1D<>(25, 30);
      Interval1D<Integer> c = new Interval1D<>(10, 40);
      Interval1D<Integer> d = new Interval1D<>(40, 50);
  
      System.out.println("a = " + a);
      System.out.println("b = " + b);
      System.out.println("c = " + c);
      System.out.println("d = " + d);
  
      System.out.println("b intersects a = " + b.intersects(a));
      System.out.println("a intersects b = " + a.intersects(b));
      System.out.println("a intersects c = " + a.intersects(c));
      System.out.println("a intersects d = " + a.intersects(d));
      System.out.println("b intersects c = " + b.intersects(c));
      System.out.println("b intersects d = " + b.intersects(d));
      System.out.println("c intersects d = " + c.intersects(d));
  
    }
docs: test client