I have been trying to understand why my student's code isn't working just to find this piece of code. Checking out code early in the morning is definitely not my thing.

  • 4
    Correct me if I'm wrong, but this could be valid right?

    Because the function is an override method, the parent class could delete a group, which is overridden in this subclass because it is now allowed for this type. Not best practice, but could work right?
  • 0
    @LHofman does this violate the liskov substitution principal?
  • 0
    @craig939393 Not necessarily, but depending on the logic of the function in the other subclasses, the open-closed principle could be breached.
Add Comment