I have a Curve class that has some CurveData inside as private member as well as getter functions for topics of interest (e.g. peaks, width and so). So the math logic of a curve is inside this class.
Things to be done with this Curve are:
Test its values (returned values from functions) with some thresholds. The test logic is not the same for each instance (few kinds of this curve) and each user may use its own tests.
Format its values as string for widgets in GUI;
Convert its
CurveDatato other type of data for other GUI objects.
For now I have 3 , or more different classes for those operations each receiving the Curve as a pointer and analyzing it, formatting it, converting or testing it.
But I wonder if this is the right approach: some people say objects should take care of themselves. Should I move those operations into the Curve class?
I don't feel it would be right, because I want to show it its not part of the Curve logic. On the other side, the Curve operations being all around the code feels bad.
All the process is part of a "use case" where I process some data and at the end showing the results to the user. The design is not critical, since I am not writing a library. But still, I want to know ho to do it the "right" OO way. I have that feeling that I am too data centric - moving data from class to class and each doing its own logic on it.
On the other side, the self-caring Curve class would change each time I will change the text format or I get a new request for additional Tests.
