Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package P91;
- /*
- * Rolls a dice 5 times, then adds the roll to a DataSet. Then it gets the average.
- */
- public class DieTester
- {
- public static void main(String[] args)
- {
- DataSet mySet = new DataSet();
- for(int i = 0; i < 5; i++)
- {
- Measurable myDice = new Die(6);
- mySet.add(myDice);
- }
- double avg = mySet.getAverage();
- System.out.println("Your average roll was " + avg);
- }
- }
Add Comment
Please, Sign In to add comment