This question already has an answer here:
not really sure about how to go about this. Been tasked (by a nonprofit organisation) to create an app that takes a maximum number (probably around 100) and then generates a random number in between. Simple enough; I then want it to rule that number out, and generate a new random, rule that out too, and so forth till all possible numbers are eliminated. Basically like a raffle. I know there is probably pages and pages of code to build this, i just need a steer in the right direction of what methods to use to achieve this. I'm studying Java at Uni and this intrigues me. To put it in context, the organisation is having an event where they will draw tickets from a hat to get a prize which has been donated. For some reason a lot of members don't like the idea of using the hat method, and want some way of making a trustworthy number generating method. They draw a ticket from the hat, then they propose they click a button for a random number, which in turn is attached to a prize. Obviously as the prizes are won their numbers must be ruled out. Thanks if anyone can help me!
Aucun commentaire:
Enregistrer un commentaire