Defining and Using Inheritance and Polymorphism
Object-oriented (OO) programming languages demand a change in thinking, but sometimes you may find yourself asking why. The foregoing part of this chapter explains the mechanics of building object types as libraries. You can also build libraries by developing a collection of functions. While building libraries of object types requires more effort and design than building collections of functions, the return on your investment of time is their extensibility.
Objects are extensible because you can add to their capabilities by building subclasses. Subclasses inherit the behaviors of other class, which become known as superclasses. Subclasses can also override the behaviors of their superclass by creating ...
Get Oracle Database 10g Express Edition PHP Web Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.