Assignment #14 More Variables and Printing

Code

    /// Name: Matthew Lorence
    /// Period: 5
    /// Program Name: More VariablesAndPrinting
    /// File Name: MoreVariablesAndPrinting.java
    /// Date Finished:9/22/15
    
    public class MoreVariablesAndPrinting
    {
        public static void main( String[] args )
        {
            String Name, Eyes, Teeth, Hair;
            int Age, Height, Weight;
            double Weight_kg, Height_cm;
    
            Name = "Joshua P. Davis";
            Age = 36;     // not a lie
            Height = 74;  // inches
            Weight = 235; // lbs
            Eyes = "Hazel";
            Teeth = "White";
            Hair = "Brown";
            Weight_kg = Weight * .45;
            Height_cm = Height * 2.54;
    
            System.out.println( "Let's talk about " + Name + "." );
            System.out.println( "He's " + Height + " inches tall." );
            System.out.println( "He's " + Weight + " pounds." );
            System.out.println( "He's " + Height_cm + " centimeters tall." );
            System.out.println( "He's " + Weight_kg + " kilograms." );
            System.out.println( "Actually, that's not too heavy." );
            System.out.println( "He's got " + Eyes + " eyes and " + Hair + " hair." );
            System.out.println( "His teeth are usually " + Teeth + " depending on the coffee." );
    
            // This line is tricky; try to get it exactly right.
            System.out.println( "If I add " + Age + ", " + Height + ", and " + Weight
                + " I get " + (Age + Height + Weight) + "." );
        }
    }
    

Picture of the output

Assignment 14