Re: Own implementation of an interface



An interface is simply a definition of the way a class is expected to "act". It's a collection of definition of methods each of which must be implemented for a class to be said "implementing" that interface.

To create an implementation of an interface either you can write it "implements" that interface and implement every single interface method, or you can write it extends another class that implements the interface and override those methods that must have custom implementation/behavior.

Luca.

gabriel ha scritto:
Hi

Firstly i'd like to thank you for reading this and offer my appreciation for replies in advance.

I've recently been writing a program which implements a user-defined API (Robocode to be exact). I, however, need to create my own implementation of an interface in order to perform some arbitary function.

My question is, how would i go about creating my own instance of this interface so that the API utilises my methods instead of the blank, skeleton ones already provided?

Is it simply Public interface myInterface extends APIInterfaceCLassNAMe?

or is there some other method?

As far as java goes i've always been a little hazey around the concept of interfaces, thus my confusion.
thanks

Gabriel
.



Relevant Pages

  • Re: Interfacing WORD 2003 to the ACT CRM database
    ... I found ACT's Word interface to be a horrible cludge. ... ACT makes no attempt to use the functionality already present in Word ... If you know any VBA, ... > Has anyone interfaced the Customer relations Management software, ...
    (microsoft.public.word.docmanagement)
  • Re: Sorting by Date Within Subject??
    ... > I guess it's a bug (it's certainly not very nice of the interface to act ... Wonder what they did that "broke" it?!! ...
    (microsoft.public.mac.office.entourage)
  • Re: Default.aspx update guide
    ... All it does is act as an object browser showing the ... interface. ... Particularly usful for non-programming users who don't have ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: JON SKEET! i need your help!
    ... | you have mentioned importing actole.tlb into .net in a previous post - ... | i'm trying to interface with an act 6 database - so thought i'd try to ... If this works, it means that the whole ACT ...
    (microsoft.public.dotnet.languages.csharp)
  • error message with userforms
    ... i have aprogram that uses multiple userforms that act as an ... interface for the users. ...
    (microsoft.public.excel.programming)