Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is to be done in Java using Sets (HashSet). The task is to find out how many people you typically need to meet before

This is to be done in Java using Sets (HashSet).

The task is to find out how many people you typically need to meet before you meet one person born each day of the year. You are assuming there are 365 days in a year (no leap years). This means a birthday can be represented by a random number from 1 - 365. Using a set, the task is to keep track of the birthdays you have already encountered. Run the whole trial 100 times to take an average.

THE END OUTPUT OF THE NUMBER OF PEOPLE will vary due to it being a random number but it should be in the 2000s (someone in the 2000 people ballpark).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago