Assignment #14 and More Variables and Printing
Code
/// Name: Ali Kurland
/// Period: 6
/// Program Name: More Variables and Printing
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/11/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
double Centimeters, Kilos;
Name = "Ali F. Kurland";
Age = 17; // not a lie
Height = 63; // inches
Weight = 110; // lbs
Eyes = "Brown";
Teeth = "White";
Hair = "Brown";
Centimeters=2.54;
Kilos = 0.45;
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "She's " + Height + " inches (or " + Height * Centimeters + " centimeters) tall." );
System.out.println( "She's " + Weight + " pounds (or " + Weight * Kilos + "kilos)." );
System.out.println( "Actually, that's not too heavy." );
System.out.println( "She's got " + Eyes + " eyes and " + Hair + " hair." );
System.out.println( "Her teeth are usually " + Teeth + " depending on the coffee." );
// This line is tricky; try to get it exactly right.
System.out.println( "If I add " + Age + ", " + Height + ", and " + Weight
+ ", I get " + (Age + Height + Weight) + "." );
}
}
Picture of the output