title: Test interface implementation for simple calculator
body: <p>I would like to test if my implementation of an interface is done correctly or not, but just don't really know how.</p>
  
  <p>If you could give me a hint regarding my implementation (something missing maybe?), would be very much appreciated.</p>
  
  <p>It's supposed to be a simple calculator.</p>
  
  <pre><code>public interface ICalculator {
  
  /** Returns a+b */
  public int add(int a, int b);
  
  /** Returns a-b */
  public int subtract(int a, int b);
  
  /** Returns a*b */
  public int multiply(int a, int b);
  
  /** Returns minimum of a and b */
  public int min(int a, int b);
  
  /** Calculate cross sum */
  public int crosssum(int a);
  }    
  
  
  public class Calculator implements ICalculator {
  
  public int a
  public int b
  
  public int add(int a, int b) 
      System.out.println("ICalculator - add " + a + " und " + b);
      return a + b;
      }
  
  public int subtract(int a, int b) {
      System.out.println("ICalculator - subtract " + a + " und " + b);
      return a - b;
  }
  
  public int multiply(int a, int b) {
      System.out.println("ICalculator - multiply " + a + " und " + b);
      return a * b;
  }
  
  public int min(int a, int b) {
      System.out.println("ICalculator - min " + a + " und " + b);
      if (a &lt; b)
          return a;
      else
          return b;
  }
  
  public int crosssum(int a) {
      System.out.println("ICalculator - crosssum " + a);
      int sum = 0;
      while (0 != a) {
          sum = sum + (a % 10);
          a = a / 10;
      }
      return sum;
  }
  </code></pre>