Click to reopen instructions.

The goal of this exercise is to write methods in the editor to the left that pass the test cases for the methods shown below. Whenever you are ready to run the tests, hit the button above the editor. To see the specification for a method you are supposed to write, click a button in the test panel. Once you have written the method with the right name, the button will indicate whether the test cases are all passing (green, with a ✅) or some are failing (red, with an ❌) and clicking the button will show the results of the individual test cases.

In Java you have to declare the type of each argument and the type of value the method returns. In this assignment the first five methods—except divide—take int arguments and return an int; divide and everything after it take double arguments and return a double.

Pro tip: when you click one of the method buttons, the name of the method is copied to your clipboard so you can paste it into your code, saving typing and avoiding spelling errors.

Put definitions here.

Revisions:

Test results show up here.

Errors