Kotlinlearncs.online LogoJava
Return to List

Solve: Subtracter Single Method

Created By: Geoffrey Challen
/ Version: 2021.2.0

Create a class called Subtracter. Subtracter should store a single Int value which you can initialize to 0. It should also provide a public method called subtract. subtract should accept an Int parameter, subtract it from the stored value, and return the updated value.

Related Lessons

Stuck? You may find these lessons helpful: