If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.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.

8. Exceptions and Assertions

Main steps

  1. Investigate jtm.activity08 package
  2. Create class SimpleCalcException as a subclass of Exception
  3. Implement following constructors for this class:
    1. SimpleCalcException(String string)
    2. SimpleCalcException(String string, Throwable cause)
  4. 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
    3. Only SimpleCalcExceptions may be thrown. AssertionErrors have to be caught and wrapped into SimpleCalcExceptions

Additional information


  

Created by Valdis Vītoliņš on 2017-01-03 08:07
Last modified by Valdis Vītoliņš on 2024-08-27 17:25
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License