/**
 * Steven Ward
 * WardDuplicate.java | Duplicate Project
 *
 * A program to validate a user-input array and output information about duplicate elements.
 * This program first prompts the user to enter the number of elements they intend to input. This
 * number is validated to ensure that it is greater than or equal to 15, and the program will prompt
 * the user for another number (this cycle is repeated until a valid number is given); from now on,
 * this number will be referred to as 'N'. Once the user has entered a legal value for N, he/she
 * will be prompted, one at a time, for N integer elements. Each element must be an integer value on
 * the interval, [1,N] (note: this range is inclusive), and if it is not, the user will be
 * prompted repeatedly until an acceptable value has been input. Once the array has been populated
 * with N valid elements, this program presents an output containing the following information:
 *     a) the array elements given by the user (i.e. "the array")
 *     b) the elements, if any, that were duplicated
 *     c) if there are duplicate values, those values and the number of times they were duplicated.
 * When the user closes this final output window, the program will terminate.
 *
 * Due Date: October 2, 2016
 *
 * @see #main(String[] args)
 * TODO: Add 'see' tags for the methods in this program
 *       Add any additional tags as needed
 */

public class WardDuplicate {
}

@@ -1402,35 +1402,763 @@
 */%0A%0A
-public class WardDuplicate %7B
+import javax.swing.JOptionPane;%0A%0Apublic class WardDuplicate %7B%0A%0A  private static boolean tryParseInt(String value) %7B%0A    try %7B%0A      Integer.parseInt(value);%0A      // If 'value' did not represent a valid 'int', then the above threw an exception and the%0A      // following line is not executed.%0A      return true;%0A    %7D%0A    catch (NumberFormatException nfe) %7B  // If 'Integer.parseInt' throws, execution jumps here.%0A      return false;%0A    %7D%0A  %7D%0A%0A%0A  private static int%5B%5D getElements(int%5B%5D userArray, int index) %7B%0A%0A    if (index %3E= userArray.length) %7B%0A      return userArray;%0A    %7D%0A    else %7B%0A      String title = %22Element %22 + (index + 1) + %22 of %22 + userArray.length;%0A      String message = %22Please enter a number between 1 and %22 + userArray.length;%0A    %7D%0A  %7D
 %0A%7D%0A

Add some more work on 'WardDuplicate.java'