Why do a private-access variable inherited by sub-class (initialized in constructor)?
I created the system of classes describes a shape and its variations. I’ve found out public-access modifier of variable “volume” can be replaced on private so result will not change. It isn’t lead to errors. Part of my code is here: