Create an interface coversions. Which have the following functions Inchestomillimeters(), hptowatts(),wattstohp(),poundstogram(),gramtopounds(). Create one class which implements the above functions.
interface Convert_Measures { double inchestomm(double inches); double hptowatts(double hp); double wattstohp(double watts); double poundstogm(double pounds); double gmtopounds(double gm); } class Cnvrt_Msrs implements Convert_Measures { publicdouble inchestomm(double inches) { double mm; mm = 2.5 * 10 * inches; System.out.println("There are " + mm + " mm in " + inches + " inches"); return mm; } publicdouble hptowatts(double hp) { double watts; watts = 746 * hp; System.out.println("There are " + watts + " watts in " + hp + " hp"); return watts; } publicdouble wattstohp(double watts) { double hp; hp = (1/746) * watts; System.out.println("There are " + hp + " hp in " + watts + " watts"); return hp; } publicdouble poundstogm(double pounds) { double gm; gm = 453.59 * pounds; System.out.println("There are " + gm + " gm in " + pounds + " pounds"); return gm; } publicdouble gmtopounds(double gm) { double pounds; pounds = (1/453.59) * gm; System.out.println("There are " + pounds + " pounds in " + gm + " gm"); return pounds; } } class Conversions { publicstaticvoid main(String args[]) { Cnvrt_Msrs CM = new Cnvrt_Msrs(); double mm; double pounds; double watts; mm = CM.inchestomm(2); pounds = CM.gmtopounds(4.3); watts = CM.hptowatts(3); } } /* OutputThere are 50.0 mm in 2.0 inchesThere are 0.00947992680614652 pounds in 4.3 gmThere are 2238.0 watts in 3.0 hp*/