******************************************************************************************************** IMPORTANT!!!!!!

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

******************************************************************************************************** IMPORTANT!!!!!!

Post by answerhappygod »

********************************************************************************************************
IMPORTANT!!!!!!!!!! PLEASE READ HERE. DO NOT DO IT WITH
ANY LANGUAGE EXCEPT JAVA. I NEED ANSWER WITH JAVA IF YOU DONT KNOW
ANYTHING ABOUT JAVA DONT REPLY JUST SKIP. DO IT JAVA JAVA JAVA JAVA
JAVA
Important 1
Important 1 (176.28 KiB) Viewed 25 times
Galton Board Due: May 5, 2022 Project Definition The Galton board is a device for statistical experiments named after English scientist Sir Francis Galton. It consists of an upright board with evenly spaced nails (or pegs) driven into its upper half, where the nails are arranged in staggered order, and a lower half divided into a number of evenly-spaced rectangular slots. The front of the device is covered with a glass cover to allow viewing of both nails and slots. In the middle of the upper edge, there is a funnel into which balls can be poured. The funnel is located precisely above the central nail of the second row so that each ball, if perfectly centered, would fall vertically and directly onto the uppermost point of this nail's. Each time a ball hits one of the nails, it can bounce right (or left) with equal probability. In the project, you asked to implement this idea using threads in Java programming language. You can consider the ball in the above figure as threads and rectangular slots as array cells. You need to create a given number of threads if supported by your OS. Also, you need an array to count incoming threads. At any point (green circles in the figure), the thread can move either right or left. This choice is done randomly. When the thread finished its way, increase the value of the array cell by one. The below figure presents an example of the program output for a run. The values may naturally change for each run. Be sure that created thread count is equal to the sum of the values. java -jar Galton Board.jar-numThread 1000-numBins 20 java -jar Galton Board.jar -numThread 30000-numBins 20 java -jar Galton Board.jar -numThread 20000 -numBins 10 Sample Outputs: ¹0 0 1 e 17 2 57 5 215 19 647 0 47 1558 109 27:89 8 145 43-45 4342 9 176 5335 2002 10 187 5255 11 126 43.34 12 97 2917 13 58 1553 14 23 686 15 5 223 16 1 59 17 18 19 Number of requested thread: 1000 Sum of Bin values: 1000 Nice work! Both of them are equal Ⓒ 32 357 1396 3284 4928 4940 3279 1384 8 363 37 9 Number of requested thread: 20000 Sum of Bin values: 20000 Nice work! Both of them are equal 1 2 3 6 7 8 9 V 1 10 11 12 13 14 15 16 17 6 18 0 19 0 Ⓒ Number of requested thread: 30000 Sum of Bin values: 30000 Nice work! Both of them are equal 5 9
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply