I need to make conversions between units, each unit has 2 parts, its name and an integer, the integer part can be either positive or negative. I need my Unit
class to have dependency injection and be loosely coupled. For example if I need to add something in the future, I don't want to have to change my other classes that are using this class.
There should be also a Convert()
method in my unit class to convert between units. I took a look at these links:
But these seem loosely coupled.
Please let me know the recommended design pattern for this problem,