Fading Coder

One Final Commit for the Last Sprint

Mastering the Six Core Principles of Software Design

1. Single Responsibility Principle A class or interface should have only one reason to change. This means each component must handle a single, well-defined concern. Violation Example: Consider a phone system with four operations: dialing, chatting, responding, and hanging up. Combining all into a si...

Best Practices for Class Member Function Design

A common anti-pattern in class interface design can be seen in the following tree node implementation: class TreeNode { public: void updateParentPtr(TreeNode* newParent) { parent = newParent; } void changeParent(TreeNode* newParent) { // Problematic interface updateParentPtr(newParent); newParent-&g...