checking if a point is inside a specified Rectangle

前端 未结 4 1093
既然无缘
既然无缘 2020-12-11 16:41

ok, so i\'m doing an assignment for a Java class and one part of the assignment is to find out if a point is within the dimensions of a rectangle. so I created this code:

4条回答
  •  再見小時候
    2020-12-11 17:19

    It looks ok to me. I would check that your test case actually has the numbers you think it does; I would also check that your accessors are all returning the right values (I can't tell you the number of times I've implemented getX() as {return this.y;}). Other than that it's anyone's guess.

提交回复
热议问题