Skip to content

Captain is implementing RowingBoat - Adapter pattern#723

Merged
iluwatar merged 3 commits into
iluwatar:masterfrom
juanmsuarez:patch-1
Mar 11, 2018
Merged

Captain is implementing RowingBoat - Adapter pattern#723
iluwatar merged 3 commits into
iluwatar:masterfrom
juanmsuarez:patch-1

Conversation

@juanmsuarez
Copy link
Copy Markdown
Contributor

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.

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.
Copy link
Copy Markdown
Owner

@iluwatar iluwatar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compilation fails with [ERROR] /home/travis/build/iluwatar/java-design-patterns/adapter/src/main/java/com/iluwatar/adapter/Captain.java:[43,3] method does not override or implement a method from a supertype

My bad, sorry. It should compile now.
@juanmsuarez
Copy link
Copy Markdown
Contributor Author

It should be working now.

@iluwatar iluwatar merged commit c723289 into iluwatar:master Mar 11, 2018
@iluwatar
Copy link
Copy Markdown
Owner

Thanks @juaanma for this improvement 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants