Assignemnt #14 More Variables and Printing
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: More Variables and Printing
///File Name: MVaP.java
///Date: 9/17/2015
public class MVaP
{
public static void main( String[] args )
{
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
double metricHeight, metricWeight;
Name = "Pirooz Fereydouni";
Age = 15; // not a lie
Height = 69; // inches
metricHeight = Height * 2.54;
Weight = 143; // lbs
metricWeight = Weight * 0.453;
Eyes = "Brown";
Teeth = "White";
Hair = "Black";
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "He's " + Height + " inches (or " + metricHeight + " centimeters) tall." );
System.out.println( "He's " + Weight + " pounds (or " + metricWeight + " kilograms) heavy." );
System.out.println( "According to BMI that is an average weight." );
System.out.println( "He's got " + Eyes + " eyes and " + Hair + " hair." );
System.out.println( "His teeth are usually " + Teeth + " depending on the chocolate." );
// 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