Question: Please answer all parts Lab 13: Java Arrays The Birthday Coincidence Due Date: Wednesday October 31,2018 (by midnight) Weight: 4 points Obiectives: Java Arrays (chapter
Please answer all parts

Lab 13: Java Arrays The Birthday Coincidence Due Date: Wednesday October 31,2018 (by midnight) Weight: 4 points Obiectives: Java Arrays (chapter 7) Part 1 Suppose that people enter an empty room until a pair of people share a birthday. On average, how many people will have to enter before there is a match? Write a program BirthdayCoincidence.java to simulate one experiment. The output of this program is the number of people that were added until a pair had matching birthdays. Assume birthdays to be uniform random integers between 1 and 365. So, 1 represents January 1; 31 represents January 31, 32 represents February 1, 33 represents February 2; and so on until 365 representing December 31. Part 2 Then write a program BirthdayCoincidenceAverage.java to repeat the experiment many times and estimate the average value The number of trials to repeat the experiment should be specified via a command-line argument args [0], or using Scanner, or JOptionPane.showInputDialog) Try it with several very large numbers of trials, e.g. 10,000, 100,000 or 1,000,000. The output of this program is the average number of people that were added until a birthday match occurred. Submit a zipped file into the Lab 13 Canvas Drop Box that contains
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
