I am just getting started to try to understand Java terms. I've read some
beginner books and have not had satisfactory definitions to the following
(What is the difference between implementation and interface?)
Can anyone explain them in layman's language?
Re: Java definitions
Take any Devices as an example...
How do you control Home Appliances? you control it by the buttons provided
by the manufacturer.. these external buttons can be considered as Interface
and the implementation is what actually happening inside the Device
The Main Advantage of separating Interface with Implementation is
just in case if the manufacturer is coming with a new model which has the
same functions but different implementation meaning different things in the
Device, still he can use the same interface..
in the same way Function in Organizations does not change but the way in
which its done can change
Assume the Calculation of Over Time Pay is changing every month..
Then the module with both (Interface & Implementation ) should be re-compiled
again & again when ever there is a change ...
The rule is you can call the implemenation through the interface when the
implementation supports calculateOTPay
where as if you Separate is with an Interface (void calculateOTPay()) and
Implement the same with the actual functionality..then the advantage is even
if the implemenation changes you need to change only the implementaion part
not the interface.... which could be the GUI part of your module...
Hope this helps
"Bill" <firstname.lastname@example.org> wrote:
>I am just getting started to try to understand Java terms. I've read some
>beginner books and have not had satisfactory definitions to the following
>(What is the difference between implementation and interface?)
>Can anyone explain them in layman's language?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL