Question on refactoring and code design
- by Software Engeneering Learner
Suppose, I have a class with a constant static final field. Then I want in certain situations that field to be different. It still can be final, because it should be initialized in constructor. My question is, what strategy I should use:
add this field value into the constructor
create 2 subclasses, replace original field usage with some…