I've a VolumeButton which derives from ButtonModifier. If I put my business logic (volume up/down, mute, etc) into VolumeButton, enable/disable logic to base class ButtonModifier. Like,
public class VolumeButton : ButtonModifier
{
/// Event handler to change the volume.
void ChangeVolume() { ... }
}
public class ButtonModifier
{
/// Updates the visibility of the button.
void UpdateVolumeVisibleStatus() { ... }
/// Enable or disable the button.
void Enable(bool enable) { ... }
}
On one hand, only business logic change affects VolumeButton, and infrastructure change affects ButtonModifier. So it conforms to SRP. On the other hand, VolumeButton inherited the enable/disable logic from base class. So it has two responsibilities?
Does these two class conform to SRP?