• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

I know this sounds silly but, can somebody help?

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
bugs_whats_up_doc
Just Arrived
Just Arrived


Joined: 11 Sep 2003
Posts: 4
Location: UK

Offline

PostPosted: Mon Sep 15, 2008 10:01 am    Post subject: I know this sounds silly but, can somebody help? Reply with quote

I work for a special needs school in Notts, UK. The school runs a house points system called WAM's (Worth a Mention) where students accumulate points for good behaviour, work, etc..... all the names are put into a hat one chosen who wins a prize. in the past it has just been a volunteer to choose a winner, The ICT teacher who runs it has asked to to look at doing a random name picker on the PC connected to a big screen, and the PC picks one of the name at random when a button is pressed. I did programming but, it was MANY years ago from what I do know i`m thinking should be fairly easy to do in a Visual Basic Program.

Can anyone offer any help not sure where to start.

Thanx
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
toughcanny
Just Arrived
Just Arrived


Joined: 06 Jan 2009
Posts: 0


Offline

PostPosted: Tue Jan 27, 2009 9:10 am    Post subject: Reply with quote

You will require to program in any language. First write algorithm or psedu code then implement it

* You must have a database or any storage that will maintain all the names
* Get all names in some array.
* Randomize / unsort the array in new array. You may need 1 or more cycle like shuffling list
* Generate a new random number [index], muliplying, dividing, making hexa and again get a random number ranging within the length of array.
* Pick the element from array at above picked random number [index]
* That element will be the winner.

This is just a sample or startup. You may implement it in your own way.
Back to top
View user's profile Send private message
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register