I need an example to understand more clearly, How can I create a class with out getter and setter. So to implement a better design and adapt below mentioned principle:
- Keeping code more object oriented and avoid procedural style coding
- Reduce Law Of Demeter
- Do not violate DRY principle
- How to keep details of a class hidden from other classes
- So that the calling class (client class) will not be created containing procedural methods which will make decision based on the state of my class.