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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!