Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do you call a class that implements an interface?

Say class A implements interface B; what can we call class A in relation to interface B? Is it the case that class A is a 'subclass' of interface B (as if B was a class), or is there a special term for implementing an interface, or is there none?

Thanks in advance

Edit: Would accept Alex's response if it was an answer

like image 871
user1585968 Avatar asked Aug 08 '13 17:08

user1585968


2 Answers

You could say: A is an implementation of B.

like image 169
Bart Avatar answered Sep 27 '22 23:09

Bart


I don't know if this gives you a satisfactory answer, but let me give a try!

Any class that inherits a parent class, or implements an interface is a "Polymorph" of the parent class / interface. i.e., wherever you need an interface instance, your polymorphic version (or polymorph) can fit in well.

For exammple, if a class "FileLogger" implements "ILogger" interface, the "FileLogger" class is a polymorph of the type "ILogger".

like image 23
Dinesh Muciliath Jayadevan Avatar answered Sep 28 '22 00:09

Dinesh Muciliath Jayadevan