Friday, March 13, 2009

Abstract Class-Concrete Class example :)

Abstract classes are "abstraction" of a class as the name suggests. As an example: The Human class can be an abstract class and in its concrete classes "man" and "woman", some of the functionalities are common. For example "human" can have a function "walks". Now "walks" is something that belongs to all humans. But "dances" is a function that might be different for "man" and "woman" or maybe to anyone who belongs to this class. So we over ride the "dances" functionality to provide seperate implementation to different implementors.

No comments: