Question: Write a class that contains the following two methods: public static double footToMeter (double foot) public static double meterToFoot (double meter) The formula for the
Write a class that contains the following two methods: public static double footToMeter (double foot) public static double meterToFoot (double meter) The formula for the conversion is: meter = 0.305*foot In the same class, write a main method that invokes these methods to display the following tables. Each table should be calculated and displayed using a loop. CC:WINDOWS system321cmd.exe Feet 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 Meters 0.305 0.61 0.915 1.22 1.525 1.83 2.135 2.44 2.745 3.05 Meters 20.0 25.0 30.0 35.0 40.0 45.0 50.0 55.0 60.0 65.0 Press any key to continue Feet 65.574 81.96? 98.361 114.754 131.148 147.541 163.934 180.328 196.721 213.115
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
