Hi, I'm having trouble with this exercise, but only a part of it. I don't know how to define "abs." Here are the instructions:
The purpose of this exercise is to add to the IntClass class below a method, abs, that takes as its only argument an IntClass object and returns a new IntClass object representing the absolute value of the argument. Define the desired method as a class method. Define the desired method as an instance method. In each case, use the main method to test your code.
There's two boxes of editable code. I'm having trouble with the first one, the one with "abs." I think I'll be able to figure out the second box if I figure out the first box. I'm just having trouble understanding the instructions and am in need of a summary please.
Here is more code:
my code goes here }
Here's another box of code that they want me to fill out: