ie INH packaging rules require internal state of an object to be protected and prevent access from the external code (ie the external code can not directly see, and change the status of a Subjects). Any public access to this internal state forced through a public API to ensure the status of the objects is always valid because the public APIs ensure that all rules checking the validity and the self-realization is applied each time that status change.
because the status object generally invalid because: untested validity, the steps taken improperly or ignored the order should in
OOP with a rules it is important to remember to always declare the internal state of the object is private and only accessible via the public, protected method / property. When you use objects inside do not need to know how it works, I just know what the API is public and this ensures the audience what changes will be checked by the internal logic rules , avoiding subjects used incorrectly.
đang được dịch, vui lòng đợi..