The fastest way is to direct you to here,
JavaPF - Formatting Decimal Places

You will need to use an if/else/elseif statement to decide if the rate is 1.0x 1.5x or 2.0x

Chris