Skip to main content
10 events
when toggle format what by license comment
Apr 23, 2016 at 5:27 review Suggested edits
Apr 23, 2016 at 7:36
Apr 30, 2014 at 20:13 comment added wayfare I agree. Code provided in the post is to demonstrate the concept and not to achieve any major data blunder. The data setting rules depends a lot on the context of the problem and technical design of the module.
Apr 30, 2014 at 19:31 comment added 200_success In general, it's a good idea to provide getters and setters to prevent others from meddling with your object's internal state. However, these particular getters and setters add complexity but don't provide much protection over public Node[] child.
Apr 30, 2014 at 0:24 comment added wayfare Code edited. Should be easy to understand now.
Apr 30, 2014 at 0:21 history edited wayfare CC BY-SA 3.0
added 480 characters in body
Apr 29, 2014 at 21:35 comment added fscore Can you edit my code and show me few examples of what you are saying?
Apr 29, 2014 at 21:30 history edited wayfare CC BY-SA 3.0
Changed formatting.
Apr 29, 2014 at 21:29 comment added wayfare No, the way this should be done is make the class properties as private and then provide public setters/getters. This way you will have control on how the data is changed.
Apr 29, 2014 at 21:25 comment added fscore so you are saying I should use private in those methods and import class in main program to use the methods? what could be another way of doing it
Apr 29, 2014 at 21:15 history answered wayfare CC BY-SA 3.0