/* This code is not elegant, but it is effective. The class has 2 tasks with this *code. First, to "clean it up" and make it more 'elegant". Second, to learn from it *so that students can modify their own "Dice.java" to include a bell-shaped curve *based on the percentages. The most recent student product should be showing the *results for rolling 40ur 10-sided dice. *More comments from Mr. VL to come...*/ import javax.swing.JOptionPane; public class Dice2 { private static void doRawRandomNumber() { String firstnum; int numberofrolls; double jack3; firstnum = JOptionPane.showInputDialog("Enter number of rolls"); numberofrolls = Integer.parseInt(firstnum); int[] Myarray; Myarray=new int[19]; double jack; //int numberofrolls=300; double jack2; for (int k=0; k<19; k++){ Myarray[k] =0; } for (int i=1; i=3; k-- ){ jack=Myarray[k]; jack3= numberofrolls/100; System.out.println(k +" occurred " + Myarray[k]+ " times "+Myarray[k]/jack3 +"%"); } for (int k=18; k>=3; k-- ){ jack3= numberofrolls/100; for(int m = 1; m