A Guide to MATLAB Object-Oriented Programming

MATLAB object-oriented rules dictate only one required function for each class. In practice, there are eight functions so fundamental to MATLAB object-oriented programming that each warrants its own chapter. Apart from each other, any one from this group of eight would be easy to describe, design, and code. Toy classes rarely use more than two or three of the eight, making their design easy. We are not interested in toy classes. In industrial-strength classes, the functions comprising this so-called group of eight always occur together, and each relies on functionality contained in the other members. In Chapter 1, we discussed dependency and coupling and concluded that such reliance requires careful attention to detail. Care is doubly important for the group of eight because these functions implement the most important part of any object, its interface. As you read along and consider the examples, keep the fact of coupling in mind. Sometimes it forces design decisions that become apparent only after the coupling partner is described, designed, and implemented.
As we will soon see, the notion of an interface goes hand in hand with the object-oriented concept of encapsulation. This first major section focuses...