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:
Juan Manuel Suárez 2018-03-07 00:19:33 -03:00 committed by GitHub
parent e01d640499
commit 696ed86aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;