December 2017
Beginner to intermediate
470 pages
12h 29m
English
Methods are functions contained within classes, and in general, they will be either public or private. In general, methods have access to classes' data (which should be encapsulated away from other objects), as well as their public and private methods.
Public methods are visible to other objects and should be as stable as possible since other objects may come to depend on them. If you change them, you may unexpectedly break another object's functionality. Private methods are visible only to the instance itself, which means that other objects cannot (or should not, as is the case with R) call these methods directly. Private methods are allowed to change as often as necessary.
Public methods make use of other methods, ...