// X119Sum3.java // Andrew Hoffmann

import javax.swing.JOptionPane;

public class X119Sum3
{
	public static void main(String[] args)
		{
             int total;
             // Calls the function back to main
             total = readInt();
             // Total of numbers is shown
	         System.out.println("The total is " + total);
		}
		public static int readInt()
		{
		    String x, y;
			int first, second, total;
			// Gets first input number
			x = JOptionPane.showInputDialog("What is the first number?");
			// Gets second input number
			y = JOptionPane.showInputDialog("What is the second number?");
			// Convert string to int
			first = Integer.parseInt(x);
			// Convert string to int
			second = Integer.parseInt(y);
			// Add first and second number together
			total = first+second;
			// Returns the total back to main function
			return total;

		}
}


