Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Uploaded on Dec 9, 2010
Methods define what an instance of a class can "do". Fields define the "state" or "attributes" of an instance of a class. First, Bob recalls the earlier discussion of fields and points out the problems in exposing fields "publicly". This leads to a discussion of encapsulation and using hidden (private) fields to store the values and implement publicly visible properties as the "gate keepers" to prevent the code that is working with an instance of the class (the client) from setting the fields to an impractical or improper value.