- Joined
- Apr 14, 2012
- Messages
- 2,585
- Reaction score
- 0
- Points
- 36
:nono: Guys, we don't have to program another simulator, why don't we just replace the Dg's model with a sub, change the textures of Titan and its atmosphere and use titan with orelux.:lol:
:lol:
Yes and no. In C++, interfaces would be just classes, because C++ does not know interfaces.
But practically, it is a different concept and in many other languages also a special language element.
Interfaces only describe the signatures of functions and properties, that a class must provide to implement this interface. An interface does not implement any of these functions or properties - it leaves it to the class that implements it.
But you can treat an interface like a class for calling such functions. You can not create an instance of an interface (with "new"), because every instance is considered abstract but you can assign any object to a reference of that interface, that implements the interface.
so an interface is kinda like a virtual class?
(ps, I am sorry for all of the C++ analogies. Its wired directly into my brain you know)