Requesting Help Assembling a Hangman Program

shackman

New member
Joined
Feb 20, 2007
Messages
1
Programming Experience
Beginner
Greetings to all ...

I am a novice programmer at best and am currently enrolled in a VB .net college course.

Our final project is to assemble a simple Hangman program, which randomnly selects a word each time from a seperate text file.

Me being the novice that I am, would appreciate any assistance anyone would be able to provide regarding how to structure such a program as well as where to begin on such an extensive program.

Thank-you all in advance ... :)
 
www.rentacoder.com and www.getafreelancer.com are good sites for finding people who will do your homework. The focus of these forums is more along the lines of helping with specific issues.

One worthy point of note is that the college wouldnt have set these homeworks if it hadnt already taught the elements needed to complete it, or at least an understanding of how to find these elements.. You can thus review the notes you took in lectures, and past workshops, for guidance. DOnt forget to sit down with a pencil and paper.. Weeks of coding can save you hours of planning!
 
I really really feel like helping. Hopefully It's not to late, you haven't already made one have you? oh well. I don't know if it's against forum rules to help with homework, if it is feel free to get rid of my post. And shackman, if you suddenly feel like doing this completely on your own, you don't have to read the rest of this message. I will not leave any code examples for you, because that would just be cheating.

First, make sure this text file had a delimeter. EG: apple,bannana,orange,grapes. The comma is the delimeter. You should use a streamreader to read and save the text to a string variable. Now you can loop through the string variable using substrings, and add these substrings to an array. If you can do all this correctly, you will have a list of all the words in the text file. When you want to make a word appear, use the rnd function or a random class to select a random string from your array. Now you can display it. I hope that helps. I could give examples, but given the situation I think you can make due with this information.
 
On a side note, I don't know how to use string.split. Could you tell me? I know how to actually split the string, but I don't know how to do anything with them later. How do you add a split string to an array?
 
On a side note, I don't know how to use string.split. Could you tell me? I know how to actually split the string, but I don't know how to do anything with them later. How do you add a split string to an array?


A split string is already an array:


Dim myArray as String() 'array
myArray = "apples,bananas,lemons".Split(","c)
 
Back
Top