A Guide to MATLAB Object-Oriented Programming

In Chapter 17, we covered Class Wizard s various input dialogs along with their general operation. In this chapter, we demonstrate the complete Class Wizard process of developing a collection of classes. To do this, we will recreate our now familiar collection of classes that includes cLine Style , cShape , cStar , and cDiamond . Creating a collection of familiar classes is important because it allows us to spot logical errors. It also allows us to compare automatically generated files with the handcrafted versions. The collection also includes a rich hierarchy with both parent child inheritance and composition. This is important because the hierarchy exercises most of the available options.
The primary activity in this chapter involves entering data into the various Class Wizard dialog screens. As data are entered, the lower-list box in each dialog shows a line-by-line summary of the data. To assist you in data entry, a screen shot of each completed dialog is included. That way, all variables and functions are provided as you will see them displayed on your screen. The syntax of each line in the lower-list box is easy, and converting from the display to individual fields quickly becomes obvious. If the translation isn t clear, you can always refer back to Chapter 17. In addition, a shorthand table description of the data in each field is provided.
The first step is of course entering data. The second step allows Class Wizard to generate class files. At this point, group-of-eight...