Answer the question
In order to leave comments, you need to log in
How to write complex classes?
For example, you need to write a class with complex behavior. how to write it in a more optimal way?
now it turns out like this:
1) wrote a draft version, figured out what is needed, what is not needed, what is generally superfluous
2) wrote another one of the same, during the tests, I realized that such an algorithm is bad in itself.
3) has already written a final class.
Is it possible to somehow simplify the writing of complex classes?
Answer the question
In order to leave comments, you need to log in
It depends what you mean by complex classes. It is better to try to write simple things. Design principles to help you:
SOLID
KISS
Worse is better
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question