Have only a getter as per your first version: Don't have a field:
- simpler code
- don't have to worry about the case where
value
etc changes in the life of the object (might not happen today, but might happen one day) - less code
- it's premature optimization:
The only reason to store the calculated attribute in a field is "performance", but if you're thinking about it at design time that itself is a big mistake. Only consider using a field if you have hard evidence there actually is a performance problem. Also, if you only call the getter for some objects, it would be a waste to calculate it for all objects.
It is not necessary, or meaningful, to have a setter in either case.