• Can anyone clarify an interface for me?
    4 replies, posted
I'm working on a massive RealBasic project, and although I don't exactly need it at the moment, I would like to understand what interfaces are. A google search gave me this example (Java): [code] interface Bicycle { void changeCadence(int newValue); // wheel revolutions per minute void changeGear(int newValue); void speedUp(int increment); void applyBrakes(int decrement); }[/code] which is a little easier to understand than what's in the RealBasic docs, but still. Why would you use an interface? I don't understand the point. Is it to somehow inherit the properties???
Made a blog once, made only 2 posts in it, one of them is an interface tutorial :D [url]http://darwindevelopment.weebly.com/1/post/2010/04/interfaces.html[/url] I think it's pretty good.
Wow awesome tutorial, using animals was genius!
[QUOTE=OMGCarlos;27952652]Wow awesome tutorial, using animals was genius![/QUOTE] Actually animals are probably the most used example ever. Every single book I've seen has had animals as an example of inheritance. [editline]9th February 2011[/editline] Actually they were used even for multiple inheritance, I think.
[QUOTE=esalaka;27954127]Actually animals are probably the most used example ever. Every single book I've seen has had animals as an example of inheritance. [editline]9th February 2011[/editline] Actually they were used even for multiple inheritance, I think.[/QUOTE] Because it makes sense. I don't think there's anything more familiar in nature that can be used to explain inheritance.
Sorry, you need to Log In to post a reply to this thread.