added composite example

This commit is contained in:
2024-11-18 10:52:39 +01:00
parent fa5b8bf520
commit 927a2232dd
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
package learn.simple_composite;
public class Leaf implements Component {
@Override
public void operation() {
System.out.println("Leaf operation" + this);
}
}