If a spec (challenge writeup) states that you need to code a method with this header:
public void setX(int aValue)
Then the method header you code should match that specified header exactly.
These are all incorrect:
public void setX(int value1, int value2)//INCORRECT HEADER -> two parameters, one specified"public void SetX(int value)//INCORRECT HEADER -> SetX should be setX"public void setX1(int value)//INCORRECT HEADER -> setX1` should be setX"
Follow the code pattern shown in this example (RectangleTests).... You will be coding PointTests so rather than testing "Rectangle" objects (like the example does) you will test Point objects.
The challenge says to [The challenge is to write a test method for each of the new "Point" methods described in the previous section].
That means you will have four new test methods such as the following four:
test_setX
test_setY
test_setOneParameter
test_setTwoParameters
NOTE -- the challenge does not specify test method names which means it is "coder's choice". This is unlike the methods we add to Point, where the method headers are specified for us so we must match those exactly.
Introduction To Objects With Java
(Chapter 404 - Methods With Parameters)