Convert an objects data from int to double

Hi!

I have 3 integers in my Length class, mm, cm & m.

These values are input by user into 3 objects of the Length class.

Now I want to convert these values into double values instead of integers, then add the 3 objects together.

This is what I have tried:

**public double to_double(Length other) {**

temp = m + cm/100 + mm/1000;

return temp;

}

and when I print it to screen I get values like: 2.0, 1.0, 1.0

Which isn't what the input is.

How do you go about doing this? I really don't know what to do as of now.:(