3 ms·
I used to feel like this before writing big and complex programs. But in term of practicality, it's a whole lot easier to just write the expansion of "rectangle
by John_KZ 9y ago
I used to feel like this before writing big and complex programs. But in term of practicality, it's a whole lot easier to just write the expansion of "rectangle" to "square" than re-writing "square" from scratch, essentially copying the majority of "rectangle" properties and functionality.
- ec109685 9y agoFactor out the commonality into a service class (as stated in another comment), where your common logic can be shared.