In this exercise you'll be modeling a weighing machine.
The weight can be set and retrieved in pounds or kilograms and cannot be negative.
The weight can be displayed in SI units or US units , pounds and ounces.
A tare adjustment can be applied to the weight (for instance to deduct the weight of a container). This can be any value (even negative or a value that makes the display weight negative) as there are doubts about the accuracy of the weighing machine. For security reasons this value cannot be retrieved.
Note that:
display-weight = input-weight - tare-adjustment
Conversion ratios are as follows:
For Example:
These are example tasks that fit the weighing machine exercise: