If it is not explicitly told in following recipe, setting up services are described for Ubuntu 16.04 server, but applications are described for Ubuntu 16.04 and/or Lubuntu 16.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

9. Exceptions and Assertions

  1. Review presentation Exceptions and assertions


  2. Investigate jtm.activity08 package
  3. Create class SimpleCalcException as a subclass of Exception
  4. Implement following constructors for this class:
    1. SimpleCalcException(String string)
    2. SimpleCalcException(String string, Throwable cause)
  5. Implement basic mathematical operations for SimpleCalc class with int numbers in range of [-10..+10] (including) to pass unit tests

error Notes

  1. Input range is checked using assertions (so if they are disabled, inputs can be any int)
  2. Outputs are always checked and exception is thrown if it is outside allowed range

Additional information

Created by Valdis Vītoliņš on 2020-05-28 13:55
Last modified by Valdis Vītoliņš on 2020-05-28 13:59
Xwiki Powered
Creative Commons Attribution 3.0 Unported License