12 Replies Latest reply on Jan 11, 2007 6:54 PM by 807599

    help with creating new constructor....beginners stuff

      im supposed to create a constructor that will draw a rectangle with the same dimensions as another rectangle.
      //Default constructor
          Rectangle(double x, double y, double width, double height)
              myX = x;
              myY = y;
              myWidth = width;
              myHeight = height;
          Rectangle (Rectangle rectA)// heres the problem!
      //and then later....
      Rectangle rectA =  = new Rectangle(0,0,200,50);
      Rectangle rectB = new Rectangle (rectA);
      i'm not sure if this is where my definite problem lies, seeing that my new rectangle isn't constucted where i need it to be; i can't move rectB without ruining my other rectA's...