1. Adapter 2. 3. Adapter Convert the interface of a class into another interface clients expect.Adapter lets classes work together that couldn't otherwise because…
1. Decorator 2. 3. Decorator Attach additional responsib ilities to an object dynamically.Decorators provide aflexible alternative tosubclassing for extendingfunctionality.…