I'm modelling notification objects. The "default" ones, with name, description and so on, and then I have "progress" notifications which have everything contained in the "default" ones + a field for a message when the process is complete
r
ribesg
04/30/2019, 12:53 PM
Isn’t that the definition of a class and a subclass ?
ribesg
04/30/2019, 12:55 PM
You’d have a class for a Notification which may be a progress one or not, and a subclass ProgressNotification which overrides the right things
i
iex
04/30/2019, 2:23 PM
yeah... I just was wondering if there was a way to reduce verbosity, because subclass needs to declare all the constructor arguments in its constructor and pass them to super class. But I guess this is unavoidable