Assignment 14 and More Variables

Code

/// Name: Matthew Hughs
/// Period: 5
/// Program Name: More Variables
/// File Name: MoreVariables.java
/// Date Finished: 9/11/2015

public class MoreVariables
{
    public static void main( String[] args )
    {
        String myName, myEyes, myTeeth, myHair;
        int myAge, myHeight, myWeight;

        myName = "Matthew B. Hughs";
        myAge = 17;     
        myHeight = 72;  // inches
        myWeight = 145; // lbs
        myEyes = "Brown";
        myTeeth = "White";
        myHair = "Brown";

        System.out.println( "Let's talk about " + myName + "." );
        System.out.println( "He's " + myHeight + " inches tall." );
        System.out.println( "He's " + myWeight + " pounds." );
        System.out.println( "Actually, that's not too heavy." );
        System.out.println( "He's got " + myEyes + " eyes and " + myHair + " hair." );
        System.out.println( "His teeth are usually " + myTeeth + " depending on the soda." );

        
        System.out.println( "If I add " + myAge + ", " + myHeight + ", and " + myWeight
            + " I get " + (myAge + myHeight + myWeight) + "." );
    }
}
    

Picture of the output

MoreVariables