I vaguely understand the concept of an object graph. Does it only apply to in memory objects built via composition; or is inheritance a structual attribute of the graph as well?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Inheritance has nothing to do with an object graph. Think of an object graph as an “instance graph”, where vertices are instances, and (directed) edges are references between instances. The type of a particular instance has no bearing whatsoever on the graph; and yes, it is generally only built via composition.
The inheritance structure of a class is an entirely different concept that is often drawn as a graph (actually, with single-inheritance, it’s a tree). This is just a coincidence.