I would like to use Dimension
class (java.awt.Dimension
), but it supports only integers. I want make Rectangle and Square classes like these:
Constructor:
public Rectangle(Dimension dim(double A, double B)) {
// constructor code
}
Is it better to write my own implementation of the Dimension class?