3.4. The Team Interface and Implementation

The next class to be transformed is the Team class. The first step in the transformation is to extract all of the public methods of the class and place them in an interface, which retains the name Team. The original Team source file is then renamed BasicTeamImpl.java; the Impl suffix will be used throughout our examples to indicate implementation classes. The Basic prefix indicates that this is the simple, standard “reference implementation,” if you will, of a Team object. While the interface allows us to create entirely separate implementations, it is expected that instead we will extend the BasicTeamImpl class and add or override methods to add new functionality. The Team interface is shown in Listings ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.