I am to produce a 2D image from a 3D model and do some calculation on the image and produce some results from that. Results will be attached at the top of that 2D image as its header.
What design pattern dose fit this case better?
Would it be better to use abstract class (since there are some common methods which could be inherited) regarding those three diagram types or an Interface?
I am mostly concerned with this 'CreateImage' method which can have different signature regarding the method that is used, Such that each digram type would have one 'CreateImage' method regardless of diagram type and rendering method.(Im not sure this would be possible at all).
"Three different xxx vs two different yyy" which depend on each other sounds immediately like the Bridge Pattern to me.
In other words, you have a hierarchy of xxx, a hierarchy of yyy and xxx accepts injected yyy.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.