My first question is, is the Liskov principle applied even on constructor declaration?
I mean there, am I forced to have exactly the same number / types of parameter in my constructor for each (different) class?
Looking at this:
package com.apptest.test;
public class Application {
public static void main(String[] args) {
IRepository r = new RepositoryUser("toto");
IRepository x = new BillingRepository("billing","super");
}
}
We can see that there are two implementations of IRepository, but one uses one more parameter.
Is this correct, and can I tell that the Liskov principle is respected ?