I have the following code:
public class Rectangle extends java.awt.Rectangle
{
private Position position;
public Rectangle(Rectangle toCopy)
{
this.position = toCopy.position;
}
public Rectangle(Position position, int width, int height)
{
super(width, height);
this.position = position;
}
This works fine, however I need width and height to be floats. The problem is the constructor in java.awt.Rectangle takes in an int type for width and height. Is there any way to make width and height floats within the constructor?