beyondgrader.com Logo
DemoBrowseAboutTeamLogin

Subtracter Single Method

Geoffrey Challen // 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.