Nathan Whelchel

Subscribe to Nathan Whelchel: eMailAlertsEmail Alerts
Get Nathan Whelchel: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by Nathan Whelchel

Some of the power of object-oriented design comes from abstraction, which allows for a separation of concerns between classes and their derivative parts. The general concerns of a given class are handled by the base class. Specific classes are derived from the base class to add differing behavior or functionality. Along the same lines, other classes are typically defined to manage these objects by their base class and know nothing of the details of the derived class. At some point, another object is going to want to use the derived form of the generic objects. If the kind of object required is known, and an object's identity can be determined, then the object can be promoted through casting. In Java, it is easy to determine the class of an object because that capability is built into the language. Unfortunately the methods used to manage the promotion of objects ca... (more)