Assignment #14 and More Variables And Printing
Code
/// Name: Tim Chuang
/// Period: 7
/// Program Name: More Variables And Printing
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/21/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String myName, myEyes, myTeeth, myHair;
int myAge, myHeight, myWeight;
myName = "Inori Yuzuriha";
myAge = 16; // not a lie
myHeight =68 ; // inches
myWeight = 90; // lbs
myEyes = "Red";
myTeeth = "White";
myHair = "Pink";
System.out.println( "Let's talk about " + myName + "." );
System.out.println( "She's " + myHeight + " inches tall." );
System.out.println( "She's " + myWeight + " pounds." );
System.out.println( "Actually, that's not too heavy." );
System.out.println( "She's got " + myEyes + " eyes and " + myHair + " hair." );
System.out.println( "Her teeth are usually " + myTeeth + " depending on the coffee." );
// This line is tricky; try to get it exactly right.
System.out.println( "If I add " + myAge + ", " + myHeight + ", and " + myWeight
+ " I get " + (myAge + myHeight + myWeight) + "." );
}
}
Picture of the output