CSC/ECE 517 Fall 2011/ch1 1i cl: Difference between revisions
No edit summary |
|||
Line 31: | Line 31: | ||
= See also= | = See also= | ||
http://download.oracle.com/javase/tutorial/index.html | The JavaTM Tutorials http://download.oracle.com/javase/tutorial/index.html |
Revision as of 06:15, 7 September 2011
Introduction
In O-o languages (Object-oriented languages), method is a subroutine that associates with the the class and defines the behaviors performed by the instances of the class. A ancestor class may has its descendant classes which inherit all its methods' propertiess(name,return type,etc). Method reimplementation is required when the decendent class needs to change the behavior of a method which was already implemented by the ancestor class, and it is more efficient to do so other than writing a new method. In different O-o languages, the ways to require or allow a class to reimplement methods are very different. So it is important for us to know how different languages handle the reimplementation and what are the advantages and disadvantages of them.
Reimplementation in different O-o languages
C++
Java
Ruby
Advantages
C++
Java
Ruby
Disadvantages
C++
Java
Ruby
Conclusion
Reference
See also
The JavaTM Tutorials http://download.oracle.com/javase/tutorial/index.html