Adding code for safe Composite Pattern
Adding code for transparent Composite Pattern