Skip to content

Commit 696ed86

Browse files
authored
Captain is implementing RowingBoat - Adapter pattern
Captain and RowingBoat aren't interchangable. Captain, as a client, may have a method to use the boat, but it isn't needed that they share the same interface, as it makes the code more confusing.
1 parent e01d640 commit 696ed86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adapter/src/main/java/com/iluwatar/adapter/Captain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* The Captain uses {@link RowingBoat} to sail. <br>
2727
* This is the client in the pattern.
2828
*/
29-
public class Captain implements RowingBoat {
29+
public class Captain {
3030

3131
private RowingBoat rowingBoat;
3232

0 commit comments

Comments
 (0)