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.
This commit is contained in:
parent
e01d640499
commit
696ed86aff
@ -26,7 +26,7 @@ package com.iluwatar.adapter;
|
||||
* The Captain uses {@link RowingBoat} to sail. <br>
|
||||
* This is the client in the pattern.
|
||||
*/
|
||||
public class Captain implements RowingBoat {
|
||||
public class Captain {
|
||||
|
||||
private RowingBoat rowingBoat;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user