Comparing two objects of different classes

I am building a program that has a class called Bone and a class called Joint. In another class called Skeleton, i want to compare bone and joint objects in a method in Skeleton class. Would this be possible? So i want to compare the object, if it is a Bone then do something, and if it is a Joint then do something else. can I do this? and/or how is it done? thanks for all help. I can post some code is it if needed.
Can you post some code? Are Bone and Joint subclasses of Skeleton?
Topic archived. No new replies allowed.