Hi, I am working on a personal program, not homework trust me, and the main engine driving it is a random number generator. Unfortunately, I don't know how to build that engine! To make a long story short, I have objects that have a ranking, from 1 to 10, that I want to make appear randomly in a list. Every rank starts at zero, and the rankings increase by people voting on them. The votes are from 1 to 10, 1 being the lowest and 10 the highest, and the rank is rank #/total # of votes. The problem is, I don't want the objects with the higher ranks to end up being the only ones that are randomly chosen, but I still want the rank to have some kind of effect on the probability the 10's come up. Any info, or links to code that is not the Math.Random method in Java would be appreciated
MacGyver Orca
9
Light Poster
Recommended Answers
Jump to Posttry something like a search engine.
Or a book on probability theory.
And why don't you want to use the built-in random number generator? That very fact tells me that it IS in fact homework, as every realistic project first tries to find an existing component to do something like …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.