Adding interfaces that won't be actually used
- by devoured elysium
I currently have two interfaces(that I'll name here IA and IB):
interface IA {
int Width;
int Height;
...
}
interface IB {
int Width;
int Height;
...
}
that share the same two properties: they both have a Width and a Height property.
I was thinking if there is any point in defining an IMatrix interface containing a Width and Height properties:
interface IMatrix {
int Width;
int Height;
}
The thing is that although they share both the same properties, I won't make use of polymorphism with IMatrix in any of my coding: i.e., there won't by any situation where I'll want to use an IMatrix, I'll just want to use IA and IB. Adding an IMatrix seems more like over-engineering than other thing, but I'd like to ask you guys what your opinion is on the matter.
Thanks