public class Shape { double perimeter; double area; public Shape(){} public Shape(double perimeter double area){ this.perimeter = perimeter; this.area = area; } }
import java.awt.*; public class Cirle extends Shape { double radius; public Cirle(){} public Cirle(double perimeter,double area,double radius){ super(perimeter,area); this.radius = radius; } @Override public void caulatePerimeter(){ this.perimeter = 2*3.14*this.radius*this.radius; } public void caulateArea(){ this.area = 3.14*this.radius*this.radius; } }
public class Rectangle extends Shape{ double height; double width; public Rectangle(){} public Rectangle(double perimeter,)