/
hyperruss
/
java6
Обзор
Документация
Войти
/
hyperruss
/
java6
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/Rectangle.java
28 строк
623 B
gribu
2222
06 дек 2025, 02:41
06 дек 2025, 02:41
cdeaa0c
Код
Авторство
О чём код?
class Rectangle implements Shape{ private int width; private int height; public Rectangle(int width, int height){ this.width = width; this.height = height; } public void setWidth(int width) { this.width = width; } public void setHeight(int height) { this.height = height; } @Override public Shape clone() throws CloneNotSupportedException { return (Shape) super.clone(); } @Override public void display() { System.out.println("Прямоугольник: ширина " + width + ", высота " + height); } }