Question: Implement the interface ScaleConverter, shown below, and test your implementations. } public interface ScaleConverter{ public double convertTemperature(double templn); public double convert Distance(double distanceln); public


Implement the interface ScaleConverter, shown below, and test your implementations. } public

Implement the interface ScaleConverter, shown below, and test your implementations. } public interface ScaleConverter{ public double convertTemperature(double templn); public double convert Distance(double distanceln); public double convertWeight(double weightin); Implement the interface with two classes, EnglishToMetric Converter and Metric To English Converter. The conversion formulas from English units to metric units are as follows: temperature in Celsius = (temperature in Fahrenheit - 32) * 5/9 distance in KM = distance in miles * 1.609 weight in KG = weight in pounds/2.2 These formulas should be easy to reverse for metric to English conversion, but when you write the F to C conversion code recall the rules of operator precedence. Write a driver that tests the methods from both implementations. Make sure to test the obvious cases (like converting O C to English and 32 F to metric) but also test some non-obvious cases. input 1: OC, 2.2 KM, 23.3KG input 2: -11.2C, 0.02 KM, 0.22KG input 3: temp, distance, weight (wrong input) You shall print out and give the user a message You need upload.java and 3 inputs and outputs as //

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!