Forums Register Login

Probability

+Pie Number of slices to send: Send
can anybody please tell me whether any probabilty calculation could be done using the java Math class.
e.g:- how do you simulate the possibilties of a ships arrival at a dock yard, which has a 2/10 chance of landing durring the first hour since commencement. 5/40 chance of doicking durring the second hour since commencement and 2/20 at the third hour since commencement.
Or else could using threads do the same thing specified.
Thankyou.
Probability
+Pie Number of slices to send: Send
not too sure that i understood ur problem...but the Math class has some random number generator functions.
Use Math.Random() and Math.nextDouble() to generate random numbers, the probability factors that you want should probably be coded...
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 531 times.
Similar Threads
same date should entered in another date field
probability
very tricky Interview question
probabilty
probability
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:53:43.