public class Calculator
{
  static void binaryOperatorOperation( char op, double x, double y )
  {
    switch ( op )
    {
      case '+':
        System.out.println( x + y );
        break;
      case '-':
        System.out.println( x - y );
        break;
      case '*':
        System.out.println( x * y );
        break;
      case '/':
        System.out.println( x / y );
        break;
      default:
        throw new IllegalArgumentException( "Unknown Operator!" );
    }
  }

  public static void main( String[] args )
  {
    binaryOperatorOperation( '+', 12, 100 );
  }
}
