()
| 15 | } |
| 16 | |
| 17 | public Point middle() { |
| 18 | return new Point((this.left + this.right)/2.0, (this.top + this.bottom)/2.0); |
| 19 | } |
| 20 | |
| 21 | public boolean contains(Square other) { |
| 22 | if (this.left <= other.left && this.right >= other.right && this.top <= other.top && this.bottom >= other.bottom) { |