added composite sample

This commit is contained in:
Ilkka Seppala
2014-08-13 21:14:03 +03:00
parent 6a3c206bce
commit 0c9136ac01
8 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package com.iluwatar;
public class Letter extends LetterComposite {
private char c;
public Letter(char c) {
this.c = c;
}
@Override
protected void printThisBefore() {
System.out.print(c);
}
@Override
protected void printThisAfter() {
// nop
}
}