Solid design principle
Hi I am aware about solid design principle but have few doubts as below : 1. Open close We have open for extension but close for modification. Does this mean that use always inheritance to modify or other mean is there ? Also it's standard practice not to modify class or something need to be done to prevent modifications? 2. Single responsibility Examine below class : class employee { void performJob(); void setvacation(); void findDirectReportee(); }; This class is not following single responsibility as it sets vacation as well as gives idea about direct reportee as well... How to design in this requirement as class private member may have list of direct reporting employee id and should not go into different class... Right ? Many thanks in advance. And appreciate your patience and help