The Two Interfaces in OOP

Damien Cassou, Stéphane Ducasse and Luc Fabresse http://stephane.ducasse.free.fr

Outline

What are the Consequences of

A 
{ private x ;
void foo(){ ... x ...}
}

Consequences

Cannot even copy and paste foo(){ ...} in subclasses!

Clients?

What are the clients of a class?

What do you think about this

Some tutorials mention: Fields should be private

The correct idiom is...

Benefits

.

Conclusion

A class has always two clients:

/