Rectanglepublic class Rectangle extends Object
Fields Summary |
---|
static final int | FALSE | static final int | TRUE | static final int | MAYBE | int | x | int | y | int | w | int | h |
Constructors Summary |
---|
public Rectangle(int x_, int y_, int w_, int h_)Rectangle
/* @c2j++: "Rectangle(int x_, int y_, unsigned w_, unsigned h_)" replacement: unsigned to int */
/* @c2j++: "Rectangle(int x_, int y_, int w_, unsigned h_)" replacement: unsigned to int */
x = x_;
y = y_;
w = w_;
h = h_;
|
Methods Summary |
---|
static void | main()
/* @c2j++: "Rectangle * rect = new Rectangle(10,10,100,100);" replacement: * to " " */
Rectangle rect = new Rectangle(10,10,100,100);
/* @c2j++: "rect->print();" replacement: -> to . */
rect.print();
| public void | move(int x_, int y_)move
//This is the first comment
//This is the second comment
x = x_;
y = y_;
| public void | print()print
/** @c2j++ Replacement from cout << "Rectangle " << " " << y << " " << w << " " << h << endl; System.out.println("Rectangle " + " " + String.valueOf(y) + " " + String.valueOf(w) + " " + String.valueOf(h));*/
System.out.println("Rectangle " + " " + String.valueOf(y) + " " + String.valueOf(w) + " " + String.valueOf(h));
| public void | resize(int w_, int h_)resize
w = w_;
h = h_;
|
|