SDA-10 lecture
SDA-10 lecture
Implementation
• We have a class employee which acts as composite
pattern actor class
• Composite pattern Demo, our demo class use employee
class to add department level hierarchy and print all
employees
Composite Pattern
Implementation
Step # 1
Create Employee class having list of Employee objects
Step # 2
Use the Employee class to create and print employee hierarchy
Step # 3
Verify the output
Introduction to Decorator Pattern