Whilst It's not necessarily noticeable how to reinforce a direct member accessibility like foo.num = num, You can easily increase your regular setter with a further power parameter: Getters and setters are used in quite a few object-oriented programming languages to make sure the theory of knowledge encapsulation(that is observed https://affordablehousinggurugram.in/aipl-lake-city-sector-103-gurgaon-a-new-chapter-in-urban-luxury-living/