This doesn't seem to solve the challenge according to the directions, which require us to create a method that "allows you to pass in a number that increases or decreases (if the number is negative) each side of a Square object by that number." (emphasis mine)
Your solution only changes the value of each side of the square by the new value that is passed in, it doesn't increase it or decrease it. If I pass in a negative number, it would result in a square with negative side length.
In order to conform to the challenge, should the result look like this?
This doesn't seem to solve the challenge according to the directions, which require us to create a method that "allows you to pass in a number that increases or decreases (if the number is negative) each side of a Square object by that number." (emphasis mine)
Your solution only changes the value of each side of the square by the new value that is passed in, it doesn't increase it or decrease it. If I pass in a negative number, it would result in a square with negative side length.
In order to conform to the challenge, should the result look like this?
And while I'm here, why wouldn't we use a 'return' statement with this method? Could we?