Guest User

Untitled

a guest
Apr 27th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package P91;
  2. /*
  3. * Rolls a dice 5 times, then adds the roll to a DataSet. Then it gets the average.
  4. */
  5. public class DieTester
  6. {
  7. public static void main(String[] args)
  8. {
  9. DataSet mySet = new DataSet();
  10. for(int i = 0; i < 5; i++)
  11. {
  12. Measurable myDice = new Die(6);
  13. mySet.add(myDice);
  14. }
  15. double avg = mySet.getAverage();
  16. System.out.println("Your average roll was " + avg);
  17. }
  18. }
Add Comment
Please, Sign In to add comment