package com.javarush.task.task05.task0513;
/*
Собираем прямоугольник
*/
public class Rectangle {
private int top;
private int left;
private int width;
private int height;
public void initialize(int top, int left, int width, int height) {
this.top = top;
this.left = left;
this.width = width;
this.height = height;
}
public void initialize(int top, int left) {
this.top = top;
this.left = left;
this.width = 0;
this.height = 0;
}
public void initialize(int width, int height) {
this.width = width;
this.height = width;
this.top = top;
this.left = left;
}
public void initialize(Rectangle rectangle) {
this.left = rectangle.left;
}
public static void main(String[] args) {
}
}
package com.javarush.task.task05.task0513;
/*
Собираем прямоугольник
*/
public class Rectangle {
private int top;
private int left;
private int width;
private int height;
public void initialize(int top, int left, int width, int height) {
this.top = top;
this.left = left;
this.width = width;
this.height = height;
}
public void initialize(int top, int left) {
this.top = top;
this.left = left;
this.width = 0;
this.height = 0;
}
public void initialize(int width, int height) {
this.width = width;
this.height = width;
this.top = top;
this.left = left;
}
public void initialize(Rectangle rectangle) {
this.left = rectangle.left;
}
public static void main(String[] args) {
}
}