开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜