Assignemnt #22 and Name, Age, and Salary
Code
///Name: Dakota Donahue
///Period: 5
///Project Name: Name, Age, and Salary
///File Name: RobotQuestions
///Date: 9/17/2015
import java.util.Scanner;
public class RobotQuestions
{
public static void main( String[] args )
{
String name;
int age;
double weight, income;
Scanner keyboard = new Scanner(System.in);
System.out.print("Hello human, what is your name? ");
name = keyboard.next();
System.out.print("How many times have you revolved around your puny dying star " + name + "?);
age = keyboard.nextInt();
System.out.println( "So you're " + age + ", that is old for a frail biological being such as yourself." );
System.out.print( "How many pounds of meat do you contain, " + name + "? " );
weight = keyboard.nextDouble();
System.out.print( weight + "! We will note this quantity for research purposes. Finally, what is your monetary gain, " + name + "? " );
income = keyboard.nextDouble();
System.out.println( "Those " + income + " will not help you as a farm animal, human." );
System.out.println( "Enjoy your time as a member of an enslaved species, " + name + "." );
}
}
Picture of the output