Write a program that prompts the user for a measurement in meters and then converts it into miles, feet, and inches. Use a class

public class Converter
{
   /**

   Constructs a converter that can convert between two units.
      \@param aConversionFactor
the factor by which to multiply
   to convert to the target unit
   */
   public Converter(double aConversionFactor) { . . . }

   /**

   Converts from a source measurement to a target measurement.
      \@param fromMeasurement
the measurement
      \@return
the input value converted to the target unit
   */
   public double convertTo(double fromMeasurement) { . . . }


   /**

   Converts from a target measurement to a source measurement.
      \@param toMeasurement
the target measurement
      \@return
the value whose conversion is the target measurement
   */
   public double convertFrom(double toMeasurement) { . . . }
}

In your ConverterTester class, construct and test the following Converter object:

final double MILE_TO_KM = 1.609;
Converter milesToMeters = new Converter(1000 * MILE_TO_KM);

Complete the following files:

Converter.java

/** A Converter converts between two units. */ public class Converter { . . . /** Constructs a converter that can convert between two units. @param aConversionFactor the factor with which to multiply to convert to the target unit */ public Converter(double aConversionFactor) { . . . } /** Converts from a source measurement to a target measurement. @param fromMeasurement the measurement @return the input value converted to the target unit */ public double convertTo(double fromMeasurement) { . . . } /** Converts from a target measurement to a source measurement. @param toMeasurement the measurement @return the value whose conversion is the target measurement */ public double convertFrom(double toMeasurement) { . . . } }

ConverterRunner.java

import java.util.Scanner; /** This program converts meters to miles, feet, and inches. */ public class ConverterRunner { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Please enter a distance in meters: "); double meters = in.nextDouble(); . . . System.out.println("miles: " + ...); System.out.println("feet: " + ...); System.out.println("inches: " + ...); } }

ConverterTester.java

/** This program tests the Converter class. */ public class ConverterTester { public static void main(String[] args) { final double MILE_TO_KM = 1.609; Converter milesToMeters = new Converter(1000 * MILE_TO_KM); System.out.println(...); System.out.println("Expected: ..."); System.out.println(...); System.out.println("Expected: ..."); } }