@@ -0,0 +1,1675 @@
+/*%0Aauthor: matt delashaw%0Adate: 1-20-16%0Abored. lottery number generator. success not guaranteed with use.%0A*/%0Aimport java.util.Random;%0Aimport javax.swing.JOptionPane;%0Aimport java.util.Arrays;%0A%0Apublic class NewLotteryGeneratorGui %7B%0A%09public static void main (String %5B%5Dargs) %7B%0A%09%09int duplicate = Integer.parseInt(JOptionPane.showInputDialog(%22How many tickets do you want to make?%22));%0A%09%09int digits = Integer.parseInt(JOptionPane.showInputDialog(%22Input how many numbers (NOT INCLUDING BONUS).%22));%0A%09%09int range = Integer.parseInt(JOptionPane.showInputDialog(%22Input highest number range, INCLUSIVE.%22));%0A%09%09%0A%09%09Random randGen = new Random();%09%09%0A%09%09for(int i = 0; i %3C duplicate; i++) %7B%0A%09%09%09%0A%09%09%09int%5B%5D randInt = new int%5Bdigits%5D;%0A%09%09%09int instance = randGen.nextInt(range + 1);%0A%09%09%09%0A%09%09%09for(int ii = 0; ii %3C randInt.length; ii++) %7B%0A%09%09%09%09int found = search(randInt, instance);%0A%09%09%09%0A%09%09%09%09switch(found)%7B%0A%09%09%09%09%0A%09%09%09%09%09case 1 : randInt%5Bii%5D = instance;%0A%09%09%09%09%09%09%09%09break;%0A%09%09%09%09%0A%09%09%09%09%09case 0 : instance = randGen.nextInt(range);%0A%09%09%09%09%09%09%09%09ii = ii - 1;%0A%09%09%09%09%09%09%09%09break;%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%7D%0A%09%09%09JOptionPane.showMessageDialog(null, %22%22 + Arrays.toString(randInt) + %22%22);%09%09%0A%09%09%7D%0A%09%09%0A%09%09int yn = JOptionPane.showConfirmDialog(null, %22Is there a bonus number?%22, %22Choose One%22, JOptionPane.YES_NO_OPTION);%0A%09%09if(yn == 0)%7B%0A%09%09%09int bRange = Integer.parseInt(JOptionPane.showInputDialog(%22Input bonus number range, INCLUSIVE.%22));%0A%09%09%09for(int d = 0; d %3C duplicate; d++)%7B%0A%09%09%09%09int bonus = randGen.nextInt(bRange) + 1;%0A%09%09%09%09JOptionPane.showMessageDialog(null, %22%22 + bonus + %22%22);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09public static int search (int%5B%5D array, int find) %7B%0A%09%0A%09%09for(int ii = 0; ii %3C array.length; ii++)%7B%0A%09%09%09if(array%5Bii%5D == find)%7B%0A%09%09%09%09return 0;%0A%09%09%09%7D%0A%09%09%7Dreturn 1;%0A%09%0A%09%7D%0A%7D%0A

Create NewLotteryGeneratorGui.java