miagouldbooks


A protected tag means that that class is accessible to classes that have a protected relationship with it. Finally a public tag, means that that class is accessible from within the entire program code. So if an Orange Button class (the color orange is made up of the primary colors red and yellow) inherits from a protected Red Button Class and a private Yellow Button class, then the Red Button class can share with it all of its’ public and protected parts.

The Yellow Button class can share with it only its’ public parts. Imagining the nested relationships as a button within a button was what got me started in writing this article, but you can also think of it as the three primary colors (red, blue and yellow) and all of the colors that descend (or inherit) from them.

꽁머니

 

 

 


Leave a Reply

Your email address will not be published. Required fields are marked *