A class implements a new interface.
The class LandVehicles in the library project implements the interface Vehicle.
public interface Vehicle {
String getType();
}
-public abstract class LandVehicle { }
+public abstract class LandVehicle implements Vehicle { }
Hereafter, we list the broken uses that are currently detected by Maracas.
The concrete Car class in a client project extends the LandVehicle abstract class defined in the library.
The Car class does not override the getType() method declared within the now-added interface (i.e. Vehicle).
Then, a broken use is reported pointing to the class declaration.
// Broken use reported here
public class Car extends LandVehicle { }