Java关于图形重叠的计算
* Add an abstract public method `boolean overlaps(Shape other)` to `Shape` that
takes a single `Shape` as an argument and returns `true` if the other shape
overlaps the shape it is called on. Assume the squares are upright (parallel
to the axis).
要求:一个Shape类,有内部类Circle和Square,写一个boolean overlaps(Shape other)计算是否两个图形是否有重叠,有返回true,否则false。如何简单的写出圆和正方形,正方形和正方形以及圆和圆是否有重叠。求思路