ABSTRACT

Form affects function, in terms of efficiency, readability, and maintainability. We begin by examining contractual design as it rests on the class construct and the principle of encapsulation. A secure class design internally controls state and shields data from unconditional external access. Class methods include: constructors (and possibly a destructor), accessors, mutators, and utility functions. Contractual design separates internal responsibilities from external, client obligations, where the client is the code component that instantiates and manipulates an object from the defined class.