Skip to content

Instantly share code, notes, and snippets.

@Naomi-Dennis
Last active December 6, 2019 14:37
class Rectangle{
public Integer width = 0;
public Integer height = 0;
Rectangle(Integer _width, Integer _height){
width = _width;
height = _height;
}
public Integer area(){
return width * height;
}
}
class Square extends Rectangle{
Square(Integer side){
super(side, side);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment