Java, Design Patterns, Structural Design Pattern, Software Engineering.
System.out.println("File: " + name); } } class Directory implements FileSystemComponent { private String name; private List<FileSystemComponent> components; public Directory(String name) { this.name = name; components = new ArrayList<>(); } public void addComponent(FileSystemComponent component) {