Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started