Inheritance
Give the Kestrel's bridge lights a family tree: a Device base class, subclasses that override and extend with super(), one loop that drives any device (polymorphism), and an abstract base class that refuses a subclass missing its methods.
Open it in the simulator