Solution — Tree Structure with Common Interface - Composite Pattern | OneNoughtOne