It's a newbie question.
I understand the technical implementation of Interfaces, Abstract classes etc. and I do understand the programmatic differences and how and when to use them. I understand that an interface is like a forced contract without a concrete definition which all implementing classes must implement but I fail to understand why such a contract should be forced in the first place?
For instance, I've a hotel 'H' that has some rooms that can be reserved,
interface H{ //example method to implement reserveRoom(int n, ...) {} ... other methods } on the other hand I've travel booking sites A1, A2, A3 etc which might have their own discount/commission programs, which might up-sell/down-sell to their guests but what I don't get is what does it might have to do with Hotel 'H' booking policy. As the only thing Hotel H is interested in getting a room filled at their asking price.
Please explain why the need of such a design of using interfaces?
Thanks.