Question: 2. Consider the following addition to the code. class IndicatorLight extends Light { public void on() { System.out.println(indicator light on); ) public void off() {

2. Consider the following addition to the code. class IndicatorLight extends Light { public void on() { System.out.println("indicator light on"); ) public void off() { System.out.println("indicator light off"); } Is the application consistent with the Liskov Substitution Principle? Provide an explanation. In the explanation describe why or why not IndicatorLight is a subtype of Light with respect to the rest of the application? Why or why not is this an example of the Square/Rectangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
