In this chapter, we take a deeper look at building classes, controlling access to members of a class and creating constructors. We discuss composition—a capability that allows a class to have references to objects of other classes as members. We reexamine the use of properties. The chapter also discusses
static class members and
readonly instance variables in detail. We investigate issues such as software reusability, data abstraction and encapsulation. We also discuss several miscellaneous topics related to defining classes.