How name class which display data? [closed]
https://softwareengineering.stackexchange.com/questions/261721
-
05-10-2020 - |
Question
Houston, we have a problem. I can't think of a simple class name. I have abstract class, something like that:
public abstract class DataDisplay {
public abstract void dataDisplay(Data data);
}
This class only displays data in some way: paint it to canvas, send SMS, send bytes through socket, etc.
Solution
- It seems like it should be an interface, not an abstract class.
- It is too generic if it can do anything from printing to console to sending your data to space. You may end up violating single responsibility principle in your implementations.
If still you think it's OK, I'd say it is a Representer
since it deals with some Data
type and presents it in a different ways, i.e. represents what is present as Data
. I have no deep enough knowledge of English, but it seems reasonable.
Licensed under: CC-BY-SA with attribution
Not affiliated with softwareengineering.stackexchange