阅读背景:

实现boolean包含Shape接口的(Rectangle2D r)方法

来源:互联网 

here is my Java problem:

这是我的Java问题:

My Circle class implements the Shape interface and thus it must implement all the methods required. I have a problem with the method boolean contains(Rectangle2D r) that "Tests if the interior of the Shape entirely contains the specified Rectangle2D". Now, Rectangle2D is an abstract class that does not provide (to the best of my poor knowledge) any method to get the coordinates of the corners of the rectangle. To be more precise: "The Rectangle2D class describes a rectangle defined by a location (x, y) and dimension (w x h). This class is only the abstract superclass for all objects that store a 2D rectangle. The actual storage representation of the coordinates is left to the subclass".My Cir




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: