Sold Out
Book Categories |
Figures xv
Code Listings xvii
Tables xxi
About the Author xxiii
Preface xxv
Introduction 1
Examples 2
Object-Oriented Software Development 2
At the Top of Your Game 3
Personal Development 3
Wicked Problems 5
Extreme Programming 6
MATLAB, Object-Oriented Programming, and You 8
Attributes, Behavior, Objects, and Classes 9
From MATLAB Heavyweight to Object-Oriented Thinker 9
Object-Oriented Design 10
Why Use Objects? 11
A Quality Focus 12
Reliability 12
Reusability 13
Extendibility 14
Summary 15
Group of Eight 17
Meeting MATLAB's Requirements 19
Variables, Types, Classes, and Objects 19
What Is a MATLAB Class? 21
Example: Class Requirements 21
Class Directory 22
Constructor 22
The Test Drive 24
Summary 26
IndependentInvestigations 27
Member Variables and Member Functions 29
Members 29
Accessors and Mutators 30
A Short Side Trip to Examine Encapsulation 31
cShape Variables 32
cShape Members 33
cShape Private Member Variables 33
cShape Public Interface 34
A Short Side Trip to Examine Function Search Priority 36
Example Code: Accessors and Mutators, Round 1 37
Constructor 37
Accessors 37
Mutators 38
Combining an Accessor and a Mutator 39
Member Functions 40
Standardization 40
The Test Drive 41
Summary 42
Independent Investigations 43
Changing the Rules...in Appearance Only 45
A Special Accessor and a Special Mutator 45
A Short Side Trip to Examine Overloading 45
Superiorto and Inferiorto 47
The Built-in Function 48
Overloading the Operators subsref and subsasgn 48
Dot-Reference Indexing 50
subsref Dot-Reference, Attempt 1 51
A New Interface Definition 52
subsref Dot-Reference, Attempt 2: Separating Public and Private Variables 53
subsref Dot-Reference, Attempt 3: Beyond One-to-One, Public-to-Private 53
subsref Dot-Reference, Attempt 4: Multiple Indexing Levels 55
subsref Dot-Reference, Attempt 5: Operator Conversion Anomaly 57
subsasgn Dot-Reference 59
Array-Reference Indexing 62
subsref Array-Reference 63
subsasgn Array-Reference 64
Cell-Reference Indexing 65
Initial Solution for subsref.m 66
Initial Solution for subsasgn.m 68
Operator Overload, mtimes 69
The Test Drive 70
subsasgn Test Drive 24 70
subsref Test Drive 72
Summary 74
Independent Investigations 75
Displaying an Object's State 77
Displaying Objects 77
What Should Be Displayed? 77
Standard Structure Display 79
Public Member Variable Display 80
Implementing display.m, Attempt 1 80
Implementing display.m, Attempt 2 81
Developer View 83
Implementing display.m with Developer View Options 84
The Test Drive 86
Summary 88
Independent Investigations 88
fieldnames.m 91
Fieldnames 91
Code Development 91
The Test Drive 93
Summary 93
Independent Investigations 94
struct.m 95
Struct 95
Code Development 96
The Test Drive 97
Summary 98
Independent Investigations 98
get.m, set.m 99
Arguments for the Member Functions get and set 99
For Developers 99
For Clients 100
Tab Completion 101
Code Development 101
Implementing get and set 102
Initial get.m 104
Initial set.m 107
The Test Drive 110
Summary 111
Independent Investigations 112
Simplify Using get, set, fieldnames, and struct 113
Improving subsref.m 114
Improving subsasgn.m 115
Improving display.m 116
Test Drive 118
Summary 121
Independent Investigations 122
Drawing a Shape 123
Ready, Set, Draw 123
Implementation 123
Modify the Constructor 124
Modify fieldnames 125
Modify get 125
Modify set 128
Modify mtimes 131
Modify reset 132
Adding Member Function draw 132
Test Drive 133
Summary 136
Independent Investigations 137
Building a Hierarchy 139
Constructor Redux 141
Specifying Initial Values 141
Private Member Functions 142
Generalizing the Constructor 143
Constructor Helper/private/ctor_ini.m 145
Constructor Helper Example/private/ctor_1.m 146
Test Drive 147
Summary 150
Independent Investigations 151
Constructing Simple Hierarchies with Inheritance 153
Simple Inheritance 154
Constructor 154
Other Standard Member Functions 157
Child Class fieldnames 161
Child Class get 162
Child Class set 165
Parent Slicing in Nonstandard Member Functions 167
draw.m 168
mtimes.m 168
reset.m 169
Test Drive 169
Summary 173
Independent Investigations 174
Object Arrays with Inheritance 175
When Is a cShape Not a cShape? 175
Changes to subsasgn 176
Vertcat and horzcat 177
Test Drive 178
Summary 182
Independent Investigations 182
Child-Class Members 183
Function Redefinition 183
/@cStar/private/ctor_ini.m with Private Member Variables 184
/@cStar/fieldnames.m with Additional Public Members 184
/@cStar/get.m with Additional Public Members 185
/@cStar/set.m with Additional Public Members 186
/@cStar/draw.m with a Title 187
Test Drive 187
Summary 189
Independent Investigations 190
Constructing Simple Hierarchies with Composition 191
Composition 191
The cLineStyle Class 192
cLineStyle's private/ctor_ini 193
cLineStyle's fieldnames 194
cLineStyle's get 195
cLineStyle's set 196
cLineStyle's private/ctor_2 197
Using a Primary cShape and a Secondary cLineStyle 198
Composition Changes to cShape's ctor_ini.m 199
Adding Line Weight to cShape's fieldnames.m 199
Composition Changes to cShape's get.m 200
Composition Changes to cShape's set.m 201
Composition Changes to cShape's draw.m 202
Composition Changes to cShape's Other Member Functions 202
lest Drive 203
Summary 204
Independent Investigations 206
General Assignment and Mutator Helper Functions 209
Helper Function Strategy 209
Direct-Link Public Variables 210
Get and subsref 210
Set and subsasgn 211
get and set Helper Functions 212
Helper functions, get, and set 212
Final template for get.m 213
Final Template for set.m 217
Color Helper Function 221
The Other Classes and Member Functions 222
Test Drive 222
Summary 223
Independent Investigations 224
Class Wizard 225
File Dependencies 226
Data-Entry Dialog Boxes 226
Main Class Wizard Dialog 227
Header Information Dialog 229
Parents...Dialog 231
Private Variable...Dialog 232
Concealed Variables...Dialog 234
Public Variables...Dialog 235
Constructors...Dialog 237
More...Dialog 238
Static Variables...Dialog 239
Private Functions...Dialog 240
Public Functions...Dialog 242
File Menu 243
Data Menu 244
Build Class Files Button 245
Summary 246
Independent Investigations 247
Class Wizard Versions of the Shape Hierarchy 249
cLineStyle Class Wizard Definition Data 249
cLineStyle Header Info 250
cLineStyle Private Variables 251
cLineStyle Public Variables 253
cLineStyle Constructor Functions 255
cLineStyle Data Dictionary 257
cLineStyle Build Class Files 258
cLineStyle Accessor and Mutator Helper Functions 259
cShape Class Wizard Definition Data 261
cShape Header Info 261
cShape Private Variables 261
cShape Concealed Variables 262
cShape Public Variables 263
cShape Constructor Functions 264
cShape Public Functions 265
cShape Data Dictionary 265
cShape Build Class Files 266
cStar Class Wizard Definition Data 268
cStar Parent 268
Other cStar Definition Data 269
cDiamond Class Wizard Definition Data 271
Test Drive 271
Summary 272
Independent Investigations 275
Advanced Strategies 277
Composition and a Simple Container Class 279
Building Containers 279
Container Implementation 280
The Standard Framework and the Group of Eight 280
Container Modifications to fieldnames 281
Container Modifications to subsref 283
Container Modifications to subsasgn 285
Container Modifications to get 287
Container Modifications to set 289
Tailoring Built-in Behavior 290
Container-Tailored end 291
Container-Tailored cat, horzcat, vertcat 291
Container-Tailored length, ndims, reshape, and size 293
cShapeArray and numel 294
Container-Tailored num2cell and mat2cell 295
Container Functions That Are Specific to cShape Objects 296
cShapeArray times and mtimes 296
cShapeArray draw 298
cShapeArray reset 299
Test Drive 299
Summary 302
Independent Investigations 302
Static Member Data and Singleton Objects 303
Adding Static Data to Our Framework 303
Hooking Static Data into the Group of Eight 304
Static Variables and the Constructor 305
Static Variables in get and set 305
Static Variables in display 306
Overloading loadobj and saveobj 307
Counting Assignments 308
Singleton Objects 308
Test Drive 309
Summary 311
Independent Investigations 312
Pass-by-Reference Emulation 313
Assignment without Equal 313
Pass-by-Reference Functions 314
Pass-by-Reference Draw 315
Pass-by-Reference Member Variable: View 316
Helpers, get, and subsref with Pass-by-Reference Behavior 316
Pass-by-Reference Behavior in the Helper 317
Pass-by-Reference Code in get.m 318
Pass-by-Reference Code in subsref.m 321
Other Group-of-Eight Considerations 321
Test Drive 322
Summary 324
Independent Investigations 324
Dot Functions and Functors 327
When Dot-Reference Is Not a Reference 327
When Array-Reference Is Not a Reference 332
Functors 333
Functor Handles 334
Functor feval 335
Additional Remarks Concerning Functors 335
Test Drive 336
Summary 337
Independent Investigations 337
Protected Member Variables and Functions 339
How Protected Is Different from Other Visibilities 339
Class Elements for Protected 339
Protected Functions and Advanced Function Handle Techniques 340
Passing Protected Handles from Parent to Child 340
Accessing and Mutating Protected Variables 341
Calling Protected Functions 343
Test Drive 344
Summary 345
Independent Investigations 346
Potpourri for {dollar}100 347
A Small Assortment of Useful Commands 347
Objectdirectory 347
Methods and methodsview 347
Functions 348
Other Functions You Might Want to Overload 348
Functions for Built-in Types 348
subsindex 349
Isfield 349
Summary 350
Independent Investigations 350
Index 351
Login|Complaints|Blog|Games|Digital Media|Souls|Obituary|Contact Us|FAQ
CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!! X
You must be logged in to add to WishlistX
This item is in your Wish ListX
This item is in your CollectionA Guide to MATLAB Object-Oriented Programming
X
This Item is in Your InventoryA Guide to MATLAB Object-Oriented Programming
X
You must be logged in to review the productsX
X
X
Add A Guide to MATLAB Object-Oriented Programming, , A Guide to MATLAB Object-Oriented Programming to the inventory that you are selling on WonderClubX
X
Add A Guide to MATLAB Object-Oriented Programming, , A Guide to MATLAB Object-Oriented Programming to your collection on WonderClub |