You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
719 B

public class Shape{
private boolean isFilled;
private String color;
public Shape() {
this.isFilled = true;
this.color = "Green";
}
public Shape(boolean isFilled,String color){
this.isFilled = isFilled;
this.color = color;
}
public void setColor(String color) {
this.color = color;
}
public void setIsFilled(boolean isFilled){
this.isFilled = isFilled;
}
public String getColor() {
return this.color;
}
public boolean getIsFilled(){
return this.isFilled;
}
public String toString() {
String ret = "";
ret += "Filled: "+this.isFilled + "\n";
ret += "Color: "+this.color + "\n";
return ret;
}
}