Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are two ways of declaring the data elements that are part of a class. You can declare them as instance variables in the same way that you declare integers and floats. You can also declare them as properties of the class. This hour explores the use of instance variables. In the next hour, Hour 9, “Declaring Properties in an Interface File,” you find out how to use properties to accomplish the same results. With declared properties, the compiler actually generates the declarations you see in this hour along with accessors that help to enforce the opacity of objects that is a hallmark of good object-oriented design.