Answer the question
In order to leave comments, you need to log in
How to create a class hierarchy?
Hello. I have some heterogeneous data sets with indicators, they can be presented in several forms: a list, a chart, a graph. Also, this data can be displayed in three formats: html, pdf and plain text in which graph and chart views are not available. Please tell me how not to produce a bunch of classes, with the ability to easily add new types and formats?
Answer the question
In order to leave comments, you need to log in
In total, it will be necessary to write M × N transformations, where M is the number of views, and N is the number of formats.
Input: view, data itself, additional parameters depending on the format
Output: format
Operations: Build You
can build only if you know from what and in what format, that is, it will not work at all in the abstract.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question