Assignment #14
Code
/// Name: Ian Stanko
/// Period: 5
/// Program Name: MoreVariablesAndPrinting
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/23/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String iansName, iansEyes, iansTeeth, iansHair;
int iansAge, iansHeight, iansWeight;
iansName = "Ian M. Stanko";
iansAge = 17;
iansHeight = 67; //inches
iansWeight = 128; //pounds
iansEyes = "brown";
iansTeeth = "White";
iansHair = "Brown";
System.out.println( "Let's talk about " + iansName + ".");
System.out.println( "He's " + iansHeight + " inches tall." );
System.out.println( "He's " + iansWeight + " pounds." );
System.out.println( "Actually, thats not too heavy." );
System.out.println( "He's got " + iansEyes + " eyes and " + iansHair + " hair." );
System.out.println( "His teeth are usually " + iansTeeth + " depending on the coffee." );
System.out.println( "If i add " + iansAge + ", " + iansHeight + ", and " + iansWeight
+ " I get " + (iansAge + iansHeight + iansWeight) + "." );
}
}
Picture of the output