I like to think of this like an Interface class, as opposed to a class's interface!  Could it perhaps be thought of as a class prototype?


Very similar to a class, but has no methods, just a list of method signatures:

interface doSomething {
	//method signatures
	void firstThing() ;
	void secondThing(int myVar) ;



By implementing an interface (i.e. using it), it's akin to signing a contract and promising to create those methods specified in the interface, within the class:

class Motorbike implements controlSpeed {
	public void brake(){
	public void acellerate(int speed) {
} ;



UML diagram. The <<Interface>> name is written between << guillemetes >>, and then lists the method signatures:




Then is implemented from a class, a dotted line with a blank arrow head is used:


Leave a Reply