What is the necessity for doing it? If you want an object to have all the featrures of a class + something more or something less, all you need to do is create another class inheriting the other. To incorporate this we have inheritance, ain't it?I don't think you can incorporate any further functionality to an object apart from the ones defined in the class.

1 User has rated as useful.
Login to rate this answer.
J.C
Answered On : Dec 15th, 2006
overload the functions
Login to rate this answer.
Use Strategy Pattern
Login to rate this answer.
I think through Inheritance you can make use of Polymorphism to acquire multiple objects of same cadre but carrying different behaviour on events.

1 User has rated as useful.
Login to rate this answer.
Shahzad Hassan
Answered On : Nov 1st, 2007
Functionality of an object can be changed by changing the property or attribute value
Login to rate this answer.
Manohar
Answered On : Nov 17th, 2007
By using the concept of virtual functions, if you consider a class as an abstract class, we can override all the methods in its derived class, hence each of the objects of derived objects can have seperate functionalities.

3 Users have rated as useful.
Login to rate this answer.
You can use a callback function as below,
typedef void (*DoFunc)();
void Draw();
void Paint();
class MyClass {
void DoSomething(DoFunc fa) { fa(); }
}
MyClass a, b;
a.DoSomething(Draw);
b.DoSomething(Paint);
Login to rate this answer.
We may forget, the question is really talking about objects of same class. So I think all the answer on virtual functions are wrong.tehoclubmay get close to the point of the question in my opinion.
Login to rate this answer.