int left, top, width, height; //напишите тут ваш код
public Rectangle (int left, int width, int top){
this.left=left;
this.top=top;
}
public Rectangle (int height, int width, int top){
this.height=height;
this.width = width;
}
public Rectangle (int left, int height, int top, int width){
this.left=left;
this.height=height;
this.width = width;
}
public Rectangle(Rectangle rec){
this.top=rec.top;
this.left=rec.left;
this.width=rec.width;
this.height=rec.height;
}
package com.javarush.task.task05.task0520;
/*
Создать класс прямоугольник (Rectangle)
*/
public class Rectangle {
int left, top, width, height; //напишите тут ваш код
public Rectangle (int left, int width, int top){
this.left=left;
this.top=top;
}
public Rectangle (int height, int width, int top){
this.height=height;
this.width = width;
}
public Rectangle (int left, int height, int top, int width){
this.left=left;
this.height=height;
this.width = width;
}
public Rectangle(Rectangle rec){
this.top=rec.top;
this.left=rec.left;
this.width=rec.width;
this.height=rec.height;
}
public static void main(String[] args) {
}
}