Code reuse is good. But subclassing generates a static coupling.
TL;DR: Favor composition over inheritance. Always. Period.
Problems
...
For further actions, you may consider blocking this person and/or reporting abuse
I don't know well Java but isn't there interfaces in this language? Because extending abstract classes is still inheritance IMO, even if you can use them as interfaces. In Ruby we only have abstract classes too, so I can understand ahah.
In all cases, your Box class is an anti composition pattern. It should encapsulate an instance of Square instead of creating it in its constructor. It makes the code less testable ;)