Assignment #14 and MoreVariablesAndPrinting
Code
/// Name: Mahima Choudhary
/// Period: 6
/// Program Name: MoreVariables
/// File Name: MoreVariables.java
/// Date Finished: 9/20/15
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
Name = "Mahima Choudhary";
Age = 16; // not a lie
Height = 64; //inches
Weight = 115; //lbs
Eyes = "Dark Brown";
Teeth = "White"; // I hope
Hair = "Brown";
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "She's " + Height + " inches (or " + (64*2.54) + " cm) tall." );
System.out.println( "She's " + Weight + " pounds (or " + (115*0.453) + " kgs)." );
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 chai." );
System.out.println( "If I add " + Age + ", " + Height + ", and " + Weight
+ " I get " + (Age + Height + Weight) + "." );
}
}
Picture of the output