/**
 * This class converts from inches to centimeters.
 * <p>Pedagogical purpose: demonstrates Java arithmetic
 *  operators and concatenating Strings with non-Strings.
 *
 * @author Sara Sprenkle
 *
 */
public class Conversion {  
    
    /**
     * Called when user runs 
     *  java Conversion
     */
    public static void main(String[] args) {
        int numInches = 1;
        double cm_per_inch = 2.540;
        double numCM = numInches*cm_per_inch;
        //int test_double_to_int = 2.0 * 1; // compiler error
        
        // Need to put + in between string literals and variables.
        // Need to put explicit spaces into string literals.
        // Note that Java will automatically convert the ints and doubles
        // to Strings when you concatenate a String with them.
        System.out.println("There are " + numCM + " cm in " + numInches + " inches.");       
        
    }
}
