I have been studying and coding in C# for some time now. But still, I can't figure the usefulness of Interfaces. They bring too little to the table. Other than providing the signatures of function, they do nothing. If I can remember the names and…
I am attempting to model a card game where cards have two important sets of features:
The first is an effect. These are the changes to the game state that happen when you play the card. The interface for effect is as follows:
boolean…
For the fields that you have as encapsulated members of a class, does it make sense to declare their type to be of the interface that you are using? For example:
public class PayrollInfo
{
private Map employees;
public…
I'm working in a corporation that has two products. One is a desktop application the other is a web-application. I'm in on the part as backend-engineer on the web-application. I design the web-interfaces. We use SOAP as the interface technology.
Now…
I have been programming for many years but I am still not comfortable with the concept of "Interfaces". I try to use interfaces but many times I don't see a mandatory use for it. I think this is probably because the projects weren't so big, or…
I'm working on a program that tests a digital circuit. The digital circuit can process accesses from multiple different caches, CACHE0, CACHE1, etc. The digital circuit can handle accesses to different memories MEM0, MEM1, etc. and a special kind of…
Let's say I have ThingImpl and IThing. The former is an implementation of the latter, which is an interface.
IThing has 1 method: do(arg1)
Is it considered a hack/bad practice to add a method in addition to do()?
Example: do(arg1, arg2)
I would like to ask a follow-up to a question I just asked:
Better to have 2 methods with clear meaning, or just 1 dual use method? I now understand why it is best to separate charge(float c); and getBalance();.
But, every method has the opportunity…
Is it necessary to use interfaces for small projects? I work at a shop writing small custom applications for clients, primarily data manipulation. I'm mostly self-taught but also took some programming classes in college. I've been trying to apply…
The more that I'm reading, the less I know about this one.
I'm actually working on a new website using Symfony.
In Symfony, you have the concept of Entity. An entity represent basically an object and discribe how this object should be stored into…
Assume I have an Ingest object that will only work with objects that implemented the MyInterface interface. The ingester takes all the said objects but our language does not have complex return types, as such, these objects, when implementing the…
I'm developing a game, I will generate objects. I have create an interface called IObject which has the following properties:
String tag // Tag for the object
Vector3 position // Where the element is positioned
Mesh mesh // This is how the object…