I have a hierarchy of three interfaces, grandparent, parent and child. Parent and child have an add method, which requires different input parameters for the child. As long as there is no problem adding the required signature to the child process, the inherited method will be pointless , so is there a way to not have it there at all? Other methods work fine.
Perhaps in order to achieve what I want, I can completely improve the design, so I will briefly talk about what interfaces are:
I collect the counters, which consist of time and value. The grandparent interface is single-read. I also have classes that are a series of consecutive readings (series) and one that contains several series working over the same period of time (just call this table).
A table can be viewed as a series (which aggregates values orthogonally to the time axis), and both tables and series can be considered as one reading (implementations that provide different methods of aggregation), therefore, inheritance. This seems to work fine, but for the add method. (I can add one point to the series, but for the table, I need an additional parameter to tell me which series it belongs to.)
source
share