/**
 * An example that illustrates the convenience of the
 * JMUConsole class (as compared to the Scanner class).
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class ConvenienceExample
{
    public static void main(String[] args)
    {
        double weight;        
        int    age;
        String address, name;
        
        JMUConsole.open();        
        JMUConsole.print("Enter your age: ");
        age = JMUConsole.readInt();
        JMUConsole.print("Enter your name: ");
        name = JMUConsole.readLine();
        JMUConsole.print("Enter your weight: ");
        weight = JMUConsole.readDouble();
        JMUConsole.print("Enter your address: ");
        address = JMUConsole.readLine();

        JMUConsole.printf("%s lives at %s is %d years old and weighs %5.1f",
                          name, address, age, weight);
        
        JMUConsole.close();        
    }
}

