Here is my question ...
I work in the telecommunications industry and have a piece of software that provides the best available network for a given service number or site installation address. My company uses a network of a wholesale supplier, and we also have our own network. To evaluate what services a client can receive, I will call the web service to find out what services are available on this telephone exchange and based on the services available, I need to perform some checks against our network or the wholesale network of the provider.
My question is, how can this be modeled using interfaces in C #? The software that I have does not use any interfaces or classes, it is only to satisfy the fact that the code cannot live outside the classes.
I am familiar with the concept of interfaces, at least at the theoretical level, but am not very familiar with the concept of programming interfaces.
What I think is as follows:
Create an IServiceQualification interface that will have a specific operation: void Qualify (). You have two classes, QualifyByNumber and QualifyByAddress, and both of them implement the interface and determine the details of the Qualify operation. I think in the right lines or is there another / better way to approach this problem.
I have read some programming examples for interfaces, but would like this to be used in a working situation.
Comments / suggestions are welcome.
Michael
source share