After learning about encapsulation in OOP, I started to use only protected
and private
properties, share data via accessors and change properties via mutators.
Right now, I’m afraid of declaring public
properties.
Is it good to keep everything private
and protected
or is there some cases where I need to use public
properties?