Idiom

Private Class Data
Intent Private Class Data design pattern seeks to reduce exposure of attributes by limiting their visibility. It reduces the number of class attributes by encapsulating them in single Data object. Explanation Real world example Imagine you are cooking a stew for your family for dinner. You want to prevent your family members from consuming the stew by tasting it while you are cooking, otherwise there will be no more stew for dinner later.
Resource Acquisition Is Initialization
Intent Resource Acquisition Is Initialization pattern can be used to implement exception safe resource management. Class diagram Applicability Use the Resource Acquisition Is Initialization pattern when You have resources that must be closed in every condition