Assignemnt #14 and More Variables And Printing
Code
///Name: Daniel Rhees
///Period: 5
///Project Name: More Variables And Printing
///File Name: MoreVariablesAndPrinting.java
///Date: 9/28/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String myName, myEyes, myTeeth, myHair;
int myAge, myHeight, myHeightCM myWeight, myWeightKG;
myName = "Daniel H. Rhees";
myAge = 16; // not a lie
myHeight = 73; // inches
myHeightCM = 185; // Centemeters
myWeight = 152; // lbs
myWeightKG = 68; // Kilograms
myEyes = "Brown";
myTeeth = "White";
myHair = "Brown";
System.out.println( "Let's talk about " + myName + "." );
System.out.println( "He's " + myHeight + " inches (or " + myHeightCM + " cm) tall." );
System.out.println( "He's " + myWeight + " pounds (or " + myWeightKG + " kg) heavy." );
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 + " unless he has coffee which isn't very often." );
// 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