super() lets a child class call an initializer defined by its parent. It supports focused constructors: a Square accepts one size, then passes that value twice to Rectangle so inherited dimensions are initialized consistently. section 4.1.3
Use super() when a subclass specializes initialization without duplicating the parent’s setup:
- A subclass can keep inherited behavior, such as Square using Rectangle.draw(), or override it when its rendering differs, as Circle does. section 4.1.3
Shape hierarchy
A Square supplies size instead of separate height and width, then delegates shared setup to Rectangle. A Circle delegates dimensions to Shape but defines its own drawing behavior.





