Design and implement Java program as follows:
1) Implement converter class hierarchy as follows:
a. Converter class which includes:
b. TemperatureConverter class which is a child of Converter and includes:
c. DistanceConverter class which is a child of Converter and includes:
d. Use the following formula for conversion: KM = M * 1.609.
2) Do not use javax.swing.SwingUtilities in this program.
3) Implement GUIConverter class using JFrame and JPanel as follows
a. The window should be centered in the computer screen. [Hint: frame.setLocationRelativeTo(null);]
b. GUI will have 3 buttons: Distance, Temperature, and Exit that generate prompts. see image.
c. When user clicks Exit, the program will terminate.
d. When user clicks Distance, an input dialog will pop up where user can type value and click OK. see image.
e. Once user clicks OK, message dialog will pop up. see image.
f. After review of the result, the OK is clicked the program returns to the original window. see image.
g. When user clicks on Temperature button, an input dialog will pop up to input value and then when clicks OK, the message dialog with pop up with converted result: see image.
h. The format for the windows should be appropriately sized. As a guideline for the window the three buttons should all be of the same dimension surrounded by not more than 1/4 or 1/2 inch of space. In this case, the two conversion buttons should be on one line and the Exit on another. All the buttons should be surrounded by not more than an inch of space.
4) There is a main () method at the end of the program.