A Guide to MATLAB Object-Oriented Programming

Part 1: Group of Eight

CHAPTER LIST

Chapter 2: Meeting MATLAB s Requirements
Chapter 3: Member Variables and Member Functions
Chapter 4: Changing the Rules in Appearance Only
Chapter 5: Displaying an Object s State
Chapter 6: fieldnames.m
Chapter 7: struct.m
Chapter 8: get.m, set.m
Chapter 9: Simplify Using get, set, fieldnames, and struct
Chapter 10: Drawing a Shape

PART OVERVIEW

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...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Middleware
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.