classes to convert voltage and resistance