|
Object-oriented programming is introduced as a new programming concept which should help you in developing high quality software. Object-orientation is also introduced as a concept which makes developing of projects easier. It is necessary to understand Some of the concepts used extensively in object oriented programming. These include:
Object: Object are the basic run time entities in an object oriented system. They may represent any item that the program has to handle. They may also represent user define data such as vector, time and lists.
Classes: The entire set of data and code of an object can be made a user define data type with the help of a class. Object are variables of type class. Once a class has been defined, we can create any number of objects belonging to that class. A class is a collection of objects of similar type.
Data abstraction and encapsulation: The wrapping up of data and function in to a single unit ( called class) is known as encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the outside world, and only those function which are wrapped in the class can be access it. Abstraction refers to the act of representing essential features without including the background detail or explanations. Class use the concept of abstraction and are defined as a list of abstract attributes. The attribute some time called data member because they hold information.
Inheritance: Inheritance is the process by which objects of one class acquire the properties of objects of another class. The concept of inheritance provide the idea of reusability. This means that we can add addition feature to an existing class with out modifying it. This is possible by deriving a new class from the existing class. the new class will have the combined feature of both the classes.
Polymorphism: Polymorphism is another important oop concept. Polymorphism means the ability to take more then one form. An operation may exhibit different behaviors in different instances. The behavior depends upon the type of data used in the operation.
Dynamic binding: Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run time. It is associated with polymorphism and inheritance. A function call associated with a polymorphic reference depends on the dynamic type of that reference.
|