Skip to content

Decorator pattern Implementation #1186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 15, 2019
Merged

Conversation

ali4j
Copy link

@ali4j ali4j commented Dec 14, 2019

I've implemented Decorator Pattern.
Here are the list of changes:

  1. EmailSender class sends emails as plain text, it should be decorated (without modification) so that emails gets encoded and compressed.
  2. SenderDecorator class implements Sender interface and provides a base class for decorator pattern.
  3. CompressingDecorator and EncodingDecorator classes are two implementaions of Sender interface that compress and encode emails.
  4. and finally DecoratorDemo class provides some tests for demonstrating the utilization of Decorator Patern.

@yanglbme yanglbme merged commit 3fe20e3 into TheAlgorithms:Development Dec 15, 2019
ali4j added a commit to ali4j/Java that referenced this pull request Dec 25, 2019
Merge pull request TheAlgorithms#1186 from ali4j/Development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants