From the textbook, do Exercises 7.15 and 7.27 (also note extra instructions below).
For these exercises, your programs should get any user inputs and print results using the JOptionPane class so that they work with a basic GUI interface. See Deitel examples in chapters 2, 4-7
Sum # of times Percentage 2 285 2.85 % 3 514 5.14 % 4 869 8.69 % 5 1091 10.91 % 6 1457 14.57 % 7 1647 16.47 % 8 1342 13.42 % 9 1116 11.16 % 10 843 8.43 % 11 568 5.68 % 12 268 2.68 % Total # of rolls: 10000For large numbers of rolls, you'll find the percentages should be similar each time, if you are computing the die rolls correctly. (Remember, we are rolling 2 six-sided dice -- this is NOT the same as just picking a random number from 2 through 12).
Use JOptionPane to ask the user for the input of a number N. As in ex. 6.26, you will compute and print all the prime numbers less than or equal to N (instead of using 1000, as stated in the problem). However, use the process described in 7.27 (array of booleans) to figure the primes. As before, the output of your results should be 10 numbers per line. However, the results should be displayed in a JTextArea (using an "information message" JOptionPane). Also, make this text area scrollable (i.e. use JScrollPane).
HINT:
Remember that Fig. 5.19 from Deitel shows a good example of a scrollable
text area.
E-mail this jar file to me (myers@cs.fsu.edu) by the due date. Your
e-mail subject should be HW4-SUBMIT. Include your name and section
in the e-mail body. Please only submit ONCE, unless you make a mistake
and need to correct it (before the due date) -- and minimize this. Only
the last submission will be graded.