public class Prostokat extends Figura { private double bok_x = 0; private double bok_y = 0; Prostokat(String kolor, double bok_x, double bok_y) { this.kolor = kolor; this.bok_x = bok_x; this.bok_y = bok_y; } public String getKsztalt() { return Prostokat.class.getName(); } public double getPowierzchnia() { return this.bok_x * this.bok_y; } public double getObwod() { return 2 * this.bok_x + 2 * this.bok_y; } }