# Java: Example - Calc Extensions

Example - Calc Main, Example - Calc GUI, Example - Calc Extensions

Programming exercises.

1. Check for zero before doing division.
2. Add remainder (%) operator.

3. The calculator example program (See Example - Calc Main) uses integers. Extend the calculator to use double floating-point numbers.

   Hints

   - Some variables must be changed from `int` to `double`.
   - The keyboard will have to be extended to allow a ".".
4. Format double results with DecimalFormat.
5. Change to RPN (Reverse Polish Notation).
6. Add keyboard listener.