Assignemnt #14 and MoreVariablesAndPrinting
Code
/// name: Leila Ordukhani
/// period: 6
/// program name: Eleventh Program
/// file name: MoreVariablesAndPrinting.java
/// date finished: 9/17/15
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String myName, myEyes, myTeeth, myHair;
int myAge, myHeight, myWeight;
myName = "Leila Ordukhani";
myAge = 16; // not a lie
myHeight = 168; // centimeters
myWeight = 57; // kilograms
myEyes = "Green";
myTeeth = "White";
myHair = "Brown";
System.out.println( "Let's talk about " + myName + "." );
System.out.println( "She's " + myHeight + " centimeters tall." );
System.out.println( "She's " + myWeight + " kilograms." );
System.out.println( "Actually, that's pretty light." );
System.out.println( "She's got " + myEyes + " eyes and " + myHair + " hair." );
System.out.println( "Her teeth are usually " + myTeeth + " depending on the sugar intake." );
// 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