Maneesh Godbole wrote:IMO the OP needs to share some more information on why he wants an interface. Based on the discussion till now I do not see any need.
Jack Daniels wrote:So should the implementation be done in the interface...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Fred Kleinschmidt wrote:You shouldn't call your interface "Point" since it will conflict with Java's Point class. And consider using Java's Point2D.Double class (instead of writing your own class and/or interface ), as it already has a distance() method, among others.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
My problem with Point2D.Double (and actually with most Java "Point" implementations) is that it's mutable
Consider Paul's rocket mass heater. |