Composite Design Pattern

Sachin Kumar
2 min readOct 26, 2020

In this article, we are going to discuss the Composite Design Pattern. This is the pattern in which we compose objects into a tree structure to represent part-whole hierarchies.

Let’s take an example, suppose we have a company in which we have developers and founder members which include founder and co-founder. Now, our job is to group them into two categories i.e. developer structure and founder structure. And, finally…

--

--

Sachin Kumar

Senior Java Backend Dev | Expertise in Java Microservices, Spring Boot Framework & Android apps development.