Chapter 4
Object-Oriented Programming
Overview
-
The object-oriented programming style is
becoming increasingly popular. It promises code reuse
and easier maintenance of larger projects than is possible
with traditional procedural languages.
Its use of methods and message passing instead of procedure calls
shifts the programmer's view toward close integration of data
and operations.
An interactive object-oriented language can easily be implemented
in Mathematica.
In the last chapter we discussed two important tools,
message passing and objects.
We now present the other tools, classes and inheritance.
To illustrate the programming style
we expand the example developed in
the last chapter and give an implementation of collections.
Programs
Classes.m
Accounts.m
AccountClasses.m
CmplxCl.m
Collections.m
RandomWalk3D.m

Rev. 1.0, REM, © 1996 Roman E. Maeder