Project for coding test
-
The project contains several files.
UnitKind
is an enum with the units that our system supports.UnitPrefix
contains the prefixes that can be added to theUnitKind
. For example by adding 'centi'UnitPrefix
to 'metre'UnitKind
, we get centimetre. -
BaseUnit
class contains aUnitKind
andUnitPrefix
. If noUnitPrefix
is needed (for example to represent Metre, thenUnitPrefix.Unity
is used. Ignore Exponent value for now. -
Measurement
class contains aBaseUnit
and a double measurement value. Task is to complete theConvertTo()
method in theMeasurement
class so that it converts the value to the expected unit passed in as a parameter.