title: Getting "The method inchesAndFeetToCentimeteres(double, double) is undefined for the type Demo"
body: <p>Demo.Java:</p>
  
  <pre><code>import javax.swing.*;
  
  /** 
   * This class is used to demonstrate the functionality of the MetricConverter
   * class.
   */    
  class Demo {
  
      public static void main (String[] args) {
  
          MetricConverter converter = new MetricConverter();
  
          double inputInches;
          double inputFeet;
          double centimeters, inches;
          String inputInchesAsString;
          String inputFeetAsString;
          //Get input
          inputInchesAsString = JOptionPane.showInputDialog(null, "Enter inches: ");
          inputInches =  Double.parseDouble(inputInchesAsString);
  
          inputFeetAsString = JOptionPane.showInputDialog(null, "Enter feet: ");
          inputFeet = Double.parseDouble(inputFeetAsString);
          //Perform various conversion routines
  
          centimeters = converter.inchesToCentimeters(inputInches);
          inches = converter.centimetersToInches(centimeters);
  </code></pre>
  
  <p>The line below is the one that I am having issues with that I cannot figure out. My method is created correctly and returns the correct types but it still doesn't work.</p>
  
  <pre><code>        centimeters = inchesAndFeetToCentimeteres(inputFeet, inputInches);
  
          //Display the result
          JOptionPane.showMessageDialog(null, "Input: " + inputInches + 
                                        " inches is equivalent to " +
                                        centimeters + " centimeters");
          JOptionPane.showMessageDialog(null, "Converting back to inches: " + inches);
  
          JOptionPane.showMessageDialog(null, "Input: " + inputFeet +" Feet and " + inputInches +  
                                        " inches is equivalent to " +
                                        centimeters + " centimeters");
          JOptionPane.showMessageDialog(null, "Converting back to inches: " + inches);
      }
  
  
  }
  </code></pre>
  
  <p>MetricConverter.java:</p>
  
  <pre><code>/**
   * This class provides various routines to
   * convert metric measurements to U.S. units and
   * vice versa.
   */
  class MetricConverter {
  
      //----------------------------------
      //    Data Members
      //----------------------------------
  
      /**
       * A factor to convert inches to centimeters
       */
      public static final double INCHES_TO_CENTIMETERS = 2.54; 
  
      /**
       * A factor to convert centimeters to inches
       */
      public static final double CENTIMETERS_TO_INCHES = 1 / 2.54; 
  
      /**
       * A factor to convert feet to inches
       */
      public static final double FEET_TO_INCHES = 12.0;
  
      //----------------------------------
      //    Constructors
      //----------------------------------
  
      /**
       * Default constructor
       */
      public MetricConverter() {
  
      }
  
      //-------------------------------------------------
      //  Public Methods:
      // 
      //      double  inchesToCentimeters        ( double         )
      //      double  centimetersToInches        ( double         )
      //      double  feetAndInchesToCentimeters ( double, double )
      //------------------------------------------------
  
      /**
       * Converts a given length in inches to
       * equivalent centimeters.
       * 
       * @param inches  the length expressed in inches
       * @return length expressed in centimeters
       */
      public double inchesToCentimeters(double inches) {
          return inches * INCHES_TO_CENTIMETERS;
      }
  
      /**
       * Converts a given length in centimeters to
       * equivalent inches.
       * 
       * @param centimeters the length expressed in centimeters
       * @return length expressed in inches
       */
      public double centimetersToInches(double inches) {
          return inches * CENTIMETERS_TO_INCHES;
      }
  
      /**
       * Converts a given length in feet and inches to
       * equivalent centimeters.
       * 
       * @param feet   the feet portion of the length
       * @param inches the inch portion of the length
       * @return length expressed in centimeters
       */
      public double feetAndInchesToCentimeters(double inputFeet, double inputInches) {
          inputInches = (inputFeet * FEET_TO_INCHES) + inputInches;
          double centimeters = inchesToCentimeters(inputInches);
          return centimeters;
      }                
  }
  </code></pre>