/
pandapo777
/
JavaStepik
Обзор
Документация
Войти
/
pandapo777
/
JavaStepik
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
OOP/src/box/WeightBox.java
45 строк
1014 B
pandapo777
ДЗ интерфейсы
06 апр 2025, 00:20
06 апр 2025, 00:20
56ecf60
Код
Авторство
О чём код?
package box; public class WeightBox extends Box { // double weight; // public WeightBox(double weight){ // super(Box.width, Box.length, Box.height); // this.weight = weight; // } // // public WeightBox(int weight, int i, int i1, int i2) { // } // // @Override // public void showInfo() { // super.showInfo(); // System.out.println("Вес: " + weight); // } private double weight; public WeightBox() { this.weight = weight; } public WeightBox(Box another, double weight) { super(another); this.weight = weight; } public WeightBox(double size, double weight) { super(size); this.weight = weight; } public WeightBox(double width, double length, double height, double weight) { super(width, length, height); this.weight = weight; } @Override public void showInfo() { super.showInfo(); System.out.println("Вес: " + weight); } }