24. Which design patterns have you used?
Singleton for one shared instance such as configuration (used carefully because it hides dependencies), Factory to create objects without exposing the concrete class, Builder for objects with many optional parameters, Strategy to swap algorithms such as payment methods, Observer for event notifications, Adapter to make incompatible interfaces work together, and Decorator to add behaviour without changing a class.
29. What does a UML class diagram show?
A class diagram shows classes with their attributes and methods (with visibility symbols such as + for public and − for private) and the relationships between them: inheritance (a hollow triangle arrow), interface implementation (a dashed line with a triangle), association (a line, with multiplicities such as 1..*), aggregation (a hollow diamond) and composition (a filled diamond). It is used to discuss designs before coding.