Volatility (for me) is a measure of the likelihood that a class will need to be changed.
Ideally, you create classes for extension, but are closed for modification (open closing principle). This is not always possible. Those classes that you are close to change are less volatile than others.
NDepend (a static analysis metric tool.) Has a metric called Instability , which, in my opinion, is synonymous. They define it as:
Instability (I): ratio of efferent bond (Ce) to total bond. i = Ce / (Ce + Ca). This metric is an indicator of assembly resilience to change. The range for this metric is from 0 to 1, while i = 0 indicates a fully stable assembly, and i = 1 indicates a completely unstable assembly.
You do not want Stable classes to rely on less stable ones.
As for making a decision or not, this is more like a problem with the role of the class. Of the Domain Driven Design (DDD) classes, they are usually either entities (they have an identity), or services (they organize things), or values (they are immutable and comparable, for example, RED or 100 ml).
You will enter Services, you will call the new value "Values". Objects usually come from the repository (which you enter), but internally the repository will call them new. Does it help?
source share