1) Implement converter class hierarchy as follows:a. Converter class which includes: Private attribute for input of data type double Default constructor with no parameter which sets input to Double.NaN Overloaded constructor with input for parameter Get and set methods for input attribute Method convert() which returns input valueb. TemperatureConverter class which is a child of Converter and includes: Constructors which call parent constructors Overridden convert() method to convert input (Fahrenheit temperature) toCelsius and returns the value. If the instance has no input value, it shouldreturn Double.NaN Use the following formula for conversion: C = ((F-32)*5)/9c. DistanceConverter class which is a child of Converter and includes: Constructors which call parent constructors Overridden convert() method to convert input (distance in miles) to distancein kilometers and returns the value. If the instance has no input value, itshould return Double.NaNd. Use the following formula for conversion: KM = M * 1.6092) Implement GUIConverter class using JFrame and JPanel as follows:a. GUI will have 3 buttons: “Distance Converter”, “Temperature Converter”, and“Exit”.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here