class TestRectangle { public static void main(String[] args){ Rect r = new Rect(0,0,100,50); r.enlarge(2); r.move(100,100); r.print(); } } class Rect { int x,y,width,height; public Rect(int x, int y, int width, int height){ this.x = x; this.y = y; this.width = width; this.height = height; } public void move(int x, int y){ this.x = x; this.y = y; } public void enlarge(int ratio){ width *= ratio ; height *= ratio; } public void print(){ System.out.println("x="+x+" y="+y+" width="+width+" height="+height); } }