Wednesday, September 24, 2008

Polymorphism

In object-oriented programming, polymorphism is a generic term that means 'many shapes'. (from the Greek meaning "having multiple forms"). Polymorphism is briefly described as "one interface, many implementations." polymorphism is a characteristic of being able to assign a different meaning or usage to something in different contexts - specifically, to allow an entity such as a variable, a function, or an object to have more than one form. There are two types of polymorphism one is compile time polymorphism and the other is run time polymorphism. Compile time polymorphism (early binding) is functions and operators overloading. Runtime time polymorphism (late binding) is done using inheritance and virtual functions.

Abstraction

Abstraction is the ability to generalize an object as a data type that has a specific set of characteristics and is able to perform a set of actions.
Object-oriented languages provide abstraction via classes. Classes define the properties and methods of an object type.
Examples: 1. You can create an abstraction of a dog with characteristics, such as color, height, and weight, and actions such as run and bite. The characteristics are called properties, and the actions are called methods.
2. A Recordset object is an abstract representation of a set of data.