08.22.11 - 12.18.11
Introduction to Java Programming
Monday Wednesday
04:00 PM - 05:20 PM
Comments placed in each source code file. | 5 pts |
Files put into executable JAR format | 5 pts |
Application source and class files included. | 5 pts |
Program compiles and executes without errors | 5 pts |
Program layout is reasonably similar to example (bottom of page) | 20 pts |
Program performed input error checking | 20 pts |
GUI functions properly | 20 pts |
Program produces the correct outputs | 20 pts |
Total | 100 pts |
This program will simulate the rolling of two dice and will make use of a Die class (see the RollDie.java program for an example of how to use it, RollDie.java will not be used in the lab, it is only an example of using the Die class).
The user of the program will be able to choose the number of sides for the dice between 2 and 100 (even if it is not physically possible).
The program should then allow the user to either roll the dice once or 36,000 times and should display the odds of rolling any possible total of the two dice.
When the user rolls once the program will display the value rolled on each die and the total of the two dice.
When the dice are rolled 36,000 times the program should keep track of the percentage of the time that the possible totals are rolled and the actual number of times that each total is rolled. This is not necessary when rolling once. The calculated odds and the actual percentages should be similar if the program is working correctly.
JScrollPanes should be included when appropriate.