package shape;
public abstract class Shape {
private double area;
private double per;
private String color;
public Shape() {
}
public Shape(String color) {
this.color = color;
}
public abstract void getArea();
public abstract void getPer();
public abstract void showAll();
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public void setArea(double area) {
this.area = area;
}
public void setPer(double per) {
this.per = per;
}
}
package shape;
public class Rectangle extends Shape {
private double width;
private double height;
public Rectangle() {
}
public Rectangle(double width, double height, String color) {
super(color);
this.width = width;
this.height = height;
}
@Override
public void getArea() {
double Area = height * width;
System.out.println("