SHARE
TWEET

Untitled

a guest Jun 19th, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Interval i1 = new Intervall(10.,4.);
  2.         Interval i2 = new Intervall(2.,4.);
  3.        
  4.         Double x1 = 3.;
  5.         Double x2 = 2.;
  6.  
  7.         // i1 + i2
  8.         System.out.println("" + i1 + " + " + i2 + " = " + i1.add(i2));
  9.         // i1 - i2
  10.         System.out.println("" + i1 + " - " + i2 + " = " + i1.sub(i2));
  11.         // i1 * i2
  12.         System.out.println("" + i1 + " * " + i2 + " = " + i1.mul(i2));
  13.         // i1 / i2
  14.         System.out.println("" + i1 + " / " + i2 + " = " + i1.div(i2));
  15.  
  16.         // i1 + x1
  17.         System.out.println("" + i1 + " + " + x1 + " = " + i1.add(x1));
  18.         // i1 - x2
  19.         System.out.println("" + i1 + " - " + x2 + " = " + i1.sub(x2));
  20.         // i1 * x1
  21.         System.out.println("" + i1 + " * " + x1 + " = " + i1.mul(x1));
  22.  
  23.         // x1 in i1
  24.         System.out.println("" + x1 + " in " + i1 + "?  " + i1.in(x1));
  25.         // x2 in i2
  26.         System.out.println("" + x2 + " in " + i2 + "?  " + i2.in(x2));
RAW Paste Data
Top