I completely understand that we use interface's as contract to tell developers what are the functions to implement. But is this going to be at all cases "Meaning do we have to implement an interface for each class". lets say we have only one class going to implement an interface. do we define an interface for for that class specifically. and when not to use interfaces.
My understanding is that we use interface when we would like to enforce developers to implement a set of must have functions. lets say we have a server class. then we must do interface because we always need for instance two functions one to turn the server on ServerOn();
and one to turn the server off ServerOff();