И что означает он передается в параметрах? какие еще параметры? когда мы их проходили?
Примеры:
- заданы 4 параметра: left, top, width, height
- ширина/высота не задана (оба равны 0)
- высота не задана (равно ширине) создаём квадрат
- создаём копию другого прямоугольника (он и передаётся в параметрах)<<<<<<<<<<<<<<<<<????????
package com.javarush.task.task05.task0513;
/*
Собираем прямоугольник
*/
public class Rectangle {
//напишите тут ваш код
int top, left, width, 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 top, int left, int width){
this.top = top;
this.left = left;
this.width = width;
this.height = width;
}
public static void main(String[] args) {
}
}