• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Design Patterns by
Q:

 Which of the following describes the Composite pattern correctly?

A - This pattern builds a complex object using simple objects and using a step by step approach.

B - This pattern is used where we need to treat a group of objects in similar way as a single object.

C - This pattern hides the complexities of the system and provides an interface to the client using which the client can access the system.

D - This pattern is primarily used to reduce the number of objects created and to decrease memory footprint and increase performance.

1 Answer

0 votes
by

Answer : B

Explanation

Composite pattern is used where we need to treat a group of objects in similar way as a single object.

Related questions

0 votes
asked Oct 16, 2019 in Design Patterns by DavidAnderson
0 votes
asked Oct 16, 2019 in Design Patterns by DavidAnderson
...