public class Rectangle {
private double height;
private double width;
private String color;
public Rectangle() {
}
public Rectangle(double height,double width,String color) {
this.color = color;
this.height = height;
this.width = width;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public double getArea() {
return width*height;
}
public static void main(String[] args) {
Rectangle rect = new Rectangle(100,100,"red");
System.out.println("area=" + rect.getArea());
}
}