Java, Design Patterns, Structural Design Pattern, Software Engineering.
Pattern Let’s implement the Composite Pattern to represent the file system: interface FileSystemComponent { void printName(); } class File implements FileSystemComponent { private String name; public File(String name) { this.name = name; } @Override public void printName() {