Tell, don’t askintermediate
A method that mostly reads another object’s data belongs on that object; ask an object to act rather than for its parts, and each class keeps one reason to change.
“As a parent, I want to know when my child first celebrates a birthday at school.” Write the answer as one line that calls methods which do not exist yet, then make them exist.
One line in domain terms, no stubs left, the new helper on Date, and both celebrations traced.
Published in full, before you start — every point is one of these and there is nothing else.
A method that mostly reads another object’s data belongs on that object; ask an object to act rather than for its parts, and each class keeps one reason to change.
A static field exists once for everyone, so two callers overwrite each other; an object is a private copy of the data, and its methods reach that copy through the this the compiler passes for you.