// This program is a Word Game using JOptionPane

import javax.swing.JOptionPane;

public class WordGame
{
	public static void main(String[] args)
	{
		String name, city, college, profession, animal, pet,
				inputString; // Stores strings
		int age;

		// Get persons name.
		name = JOptionPane.showInputDialog("What is your name?");

		// Get age of person.
		inputString = JOptionPane.showInputDialog("How old are you?");
		age = Integer.parseInt(inputString);

		// Get a city.
		city = JOptionPane.showInputDialog("Enter a city.");

		// Get a college.
		college = JOptionPane.showInputDialog("Enter a college.");

		// Get a profession.
		profession = JOptionPane.showInputDialog("Enter a profession.");

		// Get a type of animal.
		animal = JOptionPane.showInputDialog("Enter a type of animal.");

		// Get a pet name.
		pet = JOptionPane.showInputDialog("Enter a pet name.");

		// Display WordGame
		System.out.println("There once was a person named " + name +							" who lived in " + city +
			". At the age of " + age +
			", " + name + " went to college at " + college +
			". " + name + " graduated and went to work as a " + profession +
			". Then, " + name + " adopted a(n) " + animal +
			" named " + pet + ". They both lived happily ever after!");

		//End the program
		System.exit(0);
	}
}
