Dispatching in the object model is executing the correct code based on the type of a class. In
this example, the age method is overloaded in the Student and Employee
classes. Overloading occurs because the same name, age, is used for the methods
in all three classes. There may be a reason for calculating the age of a Student
or an Employee. For example, for insurance reasons, you may want the age of an
Employee as of the first of the month instead of using today's date as might be
defined in the Person class.
The object system dispatches, or executes,
the correct code based on the type. If an object is of type Person, then
that age method is executed. If an object is of type Student, then the age
method defined for the Student class is executed. Likewise, if an object
is of type Employee, then the age method defined for the Employee class is
executed.
The object system ensures that the right method is executed on the
right data. In other words, it is not possible to execute the wrong age
method on the right data, or the right age method on the wrong data.
The ability to redefine methods on a class basis is known a polymorphism.
For this example, you should not see this type of case statement with an
object system. It is handled by dispatching.
if type is Person then
... calculate age based on Person rules ....
else if type is Student then
... calculate age based on Student rules ....
else it type is Employee then
... calculate age based on Employee rules
Easily manipulate data with LINQ Builder AU, Australia - May 14, 2008 Linq namespace for working with relational database systems. It allows you to generate an object model that represents the structure and content of the data ...
Corticon Unveils the "Corticon Automated Customer Acquisition ... PR Web (press release), WA - May 13, 2008 Corticon ACA Content Framework - Insurance object model supporting products, factors, rates and enrollment transactions, accessed through the Business ...
Use PCOMM Scripts to Execute Remote PC Commands IT Jungle, NY - May 14, 2008 VBScript can also create Excel documents, Word documents, access the PC or network file system, read and write text files, access a remote database, ...
Oracle Jumps Into the Collaboration Market (Again) Gartner, CT - May 14, 2008 Oracle Beehive has some attractive characteristics, such as a consistent object model, tags, Outlook support and Business Process Execution Language (BPEL) ...
Data Points MSDN Magazine - May 2, 2008 NET object model. EntityConnection is used to connect to the EDM, EntityCommand is used to issue a query against the EDM, and the results of the command are ...
DOM Scripting: Web Design with JavaScript and the Document Object Model by Jeremy Keith Average Customer Review: based on 59 reviews. Customer Review: With a friendly and humorous style of writing, this book is liable to revolutionize the way your are writing your code, bringing you to an entirely new level of programming for the web. Although not very thick - the author doesn't miss a beat. No eccentricity of the various JavaScript functions is looked over, and when you are facin...
The Object Primer: Agile Model-Driven Development with UML 2.0 by Scott W. Ambler Average Customer Review: based on 10 reviews. Customer Review: For those who want a quick, fun introduction and intermediate mastery of UML 2.0 without getting sidetracked in all the esoteric notation that is rarely used, this is your book. I have used it since its release (and the edition before that) for teaching UML and good Object Oriented Design concepts. Many will throw stones (UML Purist...
Analysis Patterns: Reusable Object Models (The Addison-Wesley Object Technology Series) by Martin Fowler Average Customer Review: based on 15 reviews. Customer Review: I bet you are an object oriented software developer striving to build better applications. If you have not read GoF Design Patterns and followed that with Vlissides's Pattern Hatching, read those first. Follow those with this, Martin Fowler's Analysis Patterns. As two readings of Design Patterns took my OO knowledge from infancy to ...
Inside the C++ Object Model by Stanley B. Lippman Average Customer Review: based on 15 reviews. Customer Review: I have thought that I had enough knowledge of C++, but after reading this book, I know I was wrong. Detailed discussion of constructor, data member, virtual table, multiple inheritance etc, there are a lot of mysterious details in C++ covered in this book. Yet this book is only 280 pages, which means there are very few redundant wor...
Short-Term Object Relations Couples Therapy: The Five-Step Model (Marriage and Family Therapy) by James M Donovan Average Customer Review: based on 2 reviews. Customer Review: The author gets to the essence of couples' problems using object relations theory. Without object relations, most psychotherapists stay on the surface of the couples' problems and don't truly understand the situation. That means they can't really help the couple except for putting some band-aids on their problems. This book should be...