CSC/ECE 517 Fall 2012/ch1 1w17 ir: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Extending Objects == | |||
The ‘extend’ feature in computer programming languages allow the programmer to dynamically extend the functionality of an object at runtime, as opposed to extending functionality at compile time. This feature can be found in Object Oriented Programming (OOP) Languages. | The ‘extend’ feature in computer programming languages allow the programmer to dynamically extend the functionality of an object at runtime, as opposed to extending functionality at compile time. This feature can be found in Object Oriented Programming (OOP) Languages. | ||
__TOC__ | __TOC__ |
Revision as of 19:21, 8 September 2012
Extending Objects
The ‘extend’ feature in computer programming languages allow the programmer to dynamically extend the functionality of an object at runtime, as opposed to extending functionality at compile time. This feature can be found in Object Oriented Programming (OOP) Languages.
Introduction
The programming paradigm OOP uses 'objects' for designing applications. These objects consist of an encapsulated set of data fields and methods, and are usually an instance of a class. These objects can communicate with each other through messages (or 'methods') and process data. But in order to increase an object's functionality, it is necessary to add the features of one object to another. This can be done dynamically at run time, without repeating the code, by extending the features of one class to another. This can be done by the use of the 'extend' keyword. Many OOP oriented languages support the 'extend' feature.
Languages Using 'extend' Functionality
C++
Java
Ruby
Python
Advantages
Disadvantages
Conclusion
See also
References
<references/>