Determining optimal inheritance graph
I have a list of multiple (~40) 开发者_JAVA技巧business objects which all share some properties, either with the whole set or subsets. This could be described with the following pseudo-code:
Object Foo
property a
property b
Object Bar
property a
property c
Object Baz
property b
property c
In my case there are about 20 different properties.
How do I create the optimal inheritance graph, i.e. the one that results in the fewest (abstract) parent classes, assuming behavior is not different, only the properties?
I managed to find an article proposing a formal solution to my problem: A formal method for inheritance graph hierarchy construction. However, I am unable to access it.
精彩评论