Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 12-02-2008, 02:39 PM   #1 (permalink)
Upright
 
Java-Hangman

Hi I am currently taking a basic Java programing class and for our final grade we were told to design a game of some sort. I am doing hang man and am more lost than words can describe. If anyone has the program or a version of the program please post it because I need all the help i can get! if i don't get an A in this class than i am losing my scholarship so please please please help!!! We use the 2007 J builder program if that makes a diffrence
xostephie6290ox is offline  
Old 12-02-2008, 02:45 PM   #2 (permalink)
Tilted Cat Head
 
Cynthetiq's Avatar
 
Administrator
Location: Manhattan, NY


-+-{Important TFP Staff Message}-+-
we don't do other people's homework here.
__________________
I don't care if you are black, white, purple, green, Chinese, Japanese, Korean, hippie, cop, bum, admin, user, English, Irish, French, Catholic, Protestant, Jewish, Buddhist, Muslim, indian, cowboy, tall, short, fat, skinny, emo, punk, mod, rocker, straight, gay, lesbian, jock, nerd, geek, Democrat, Republican, Libertarian, Independent, driver, pedestrian, or bicyclist, either you're an asshole or you're not.
Cynthetiq is offline  
Old 12-02-2008, 07:26 PM   #3 (permalink)
Asshole
 
The_Jazz's Avatar
 
Administrator
Location: Chicago
Step one - call your professor.
Step two - ask for help.
Step three - do your own damn work.

Repeat as necessary.
__________________
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - B. Franklin
"There ought to be limits to freedom." - George W. Bush
"We have met the enemy and he is us." - Pogo
The_Jazz is offline  
Old 12-02-2008, 09:01 PM   #4 (permalink)
Upright
 
I have the program done most of the way but am stuck. thanks for the asshole comments.
xostephie6290ox is offline  
Old 12-02-2008, 09:13 PM   #5 (permalink)
Tilted Cat Head
 
Cynthetiq's Avatar
 
Administrator
Location: Manhattan, NY
so wait? you can't complete your assignment, you come to our community and say that if you don't get the help you'll lose your scholarship, so we should help you since that's the best interest of you...

and you call two admins assholes because we want you to do your own work?
__________________
I don't care if you are black, white, purple, green, Chinese, Japanese, Korean, hippie, cop, bum, admin, user, English, Irish, French, Catholic, Protestant, Jewish, Buddhist, Muslim, indian, cowboy, tall, short, fat, skinny, emo, punk, mod, rocker, straight, gay, lesbian, jock, nerd, geek, Democrat, Republican, Libertarian, Independent, driver, pedestrian, or bicyclist, either you're an asshole or you're not.
Cynthetiq is offline  
Old 12-02-2008, 09:48 PM   #6 (permalink)
Upright
 
I came to this site for help and was treated poorly and rude. Clearly asking for suggestions isnt an option with you people. I guess you want me to apologize for being stuck in my program? Thank you all for being respectful and mature adults.
xostephie6290ox is offline  
Old 12-02-2008, 09:59 PM   #7 (permalink)
I have eaten the slaw
 
inBOIL's Avatar
 
You asked for a program, not a suggestion.
__________________
And you believe Bush and the liberals and divorced parents and gays and blacks and the Christian right and fossil fuels and Xbox are all to blame, meanwhile you yourselves create an ad where your kid hits you in the head with a baseball and you don't understand the message that the problem is you.
inBOIL is offline  
Old 12-03-2008, 04:50 AM   #8 (permalink)
Found my way back
 
healer's Avatar
 
Location: South Africa
There's a big difference between asking for help and asking to have your work done for you. What kind of reply were you expecting - "Here, double-click on this and the program runs..." ?

If you want help, you explain (in detail) what you have done and where you're stuck. You list all the things you've tried and what the results were. Don't come in here looking for complete apps on a plate.

Regards,
Mature Adult
__________________
Quote:
Originally Posted by The_Jazz
Ok - can I edit my posts to read "what healer said"?
healer is offline  
Old 12-03-2008, 06:13 AM   #9 (permalink)
Tilted Cat Head
 
Cynthetiq's Avatar
 
Administrator
Location: Manhattan, NY
Thanks healer.

You could even post the code you've written for us to look at troubleshoot and give pointers as to where your program is problematic.

Instead, you've asked us for the whole enchilada with arrogant entitlement. .
__________________
I don't care if you are black, white, purple, green, Chinese, Japanese, Korean, hippie, cop, bum, admin, user, English, Irish, French, Catholic, Protestant, Jewish, Buddhist, Muslim, indian, cowboy, tall, short, fat, skinny, emo, punk, mod, rocker, straight, gay, lesbian, jock, nerd, geek, Democrat, Republican, Libertarian, Independent, driver, pedestrian, or bicyclist, either you're an asshole or you're not.
Cynthetiq is offline  
Old 12-03-2008, 10:11 AM   #10 (permalink)
Asshole
 
The_Jazz's Avatar
 
Administrator
Location: Chicago
If you'd said "hey, I don't understand one part of this assignment. Can someone explain it better?" I would have helped if I could.

You asked me to do your work for you.

Then you called me an asshole because I refused to aid your lazy ass, but still provided a way for you to find a way to get it done.

Nice first impression, kid. Maybe you want to try that again, this time without that chip on your shoulder.
__________________
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - B. Franklin
"There ought to be limits to freedom." - George W. Bush
"We have met the enemy and he is us." - Pogo
The_Jazz is offline  
Old 12-03-2008, 12:20 PM   #11 (permalink)
Wise-ass Latino
 
QuasiMondo's Avatar
 
Location: Pretoria (Tshwane), RSA
Now I'm disappointed. I thought there'd be a cool Hangman Java app in this thread.
__________________
Cameron originally envisioned the Terminator as a small, unremarkable man, giving it the ability to blend in more easily. As a result, his first choice for the part was Lance Henriksen. O. J. Simpson was on the shortlist but Cameron did not think that such a nice guy could be a ruthless killer.

-From the Collector's Edition DVD of The Terminator
QuasiMondo is offline  
Old 12-04-2008, 11:26 AM   #12 (permalink)
The Computer Kid :D
 
Location: 127.0.0.1
I never thought of posting my C++ homework here :-P
MikeSty is offline  
Old 12-08-2008, 07:35 PM   #13 (permalink)
Upright
 
Heres what ive got sofar

Here is what I have so far. Please don't be rude this time, and instead help me. I am seriously stuck. The program reads in from a file containg 4 letter words : Cake, Play, Bank, Ball, Dogs, Cats, Meow, Beer, Bear, Cars, Lamp. The program needs to check the word vs the guess and keep track of the number of incorrect guesses.





import java.util.*;
import java.io.*;


public class hangman
{
public static void main(String [] args) throws IOException
{
getHeading ();
startHangman ();
}
public static void getHeading () throws IOException
{
System.out.println(“Hi folks how are you today? Hope your day is going swell!”);
System.out.println(“Today we are going to play the game of Hangman!”);
System.out.print(“You will be given 5 tries before the game is over”); System.out.print(“ and the man has been fully hanged.”); System.out.println(“Let’s get started!”);
}
public static void startHangman () throws IOException
{
int maxTries = 5;
int secretWordLen;


BufferedReader infile;
Infile = new BufferedReader (new FileReader (“HangmanList.txt”));
String wordlist = fileScan.next();
String secretWord [] = wordlist[(int)Math.floor(Math.random() * wordlist.length)];
secretWordLen = Math.min(s.length(), maxWordLen);

for (i=0; i<secretWordLen; i++)
{
secretWord[i] = s.charAt(i);
}

String Response;
System.out.println(“What is your name”);
Response = in.readLine();
Response = new name;

hangPlayer = new player(name);
System.out.println(hangPlayer);

}
}

private class player
{
private player(String name)
{
int winCount = 0;
int loseCount = 0;

System.out.print(name + (", you have won " + winCount + " and you have lost ") + loseCount);
return name;
}
}
xostephie6290ox is offline  
Old 12-09-2008, 10:54 AM   #14 (permalink)
Crazy
 
What are you stuck on?
__________________
Even if you stop the clock, it gives the right time twice a day.
Once we get out of the eighties, the nineties are going to make the sixties look like the fifties.
kofspades is offline  
Old 12-09-2008, 03:55 PM   #15 (permalink)
Upright
 
well first off does this program make sense? I am stuck on keeping track of the incorrect guesses but like everythign really. i completly pulled this out of my ass because the more i asked for help from my teacher, the more i didnt understand
xostephie6290ox is offline  
Old 12-09-2008, 05:29 PM   #16 (permalink)
The Computer Kid :D
 
Location: 127.0.0.1
What is the scholarship you're receiving?
MikeSty is offline  
Old 12-09-2008, 06:44 PM   #17 (permalink)
Upright
 
well i don't see how that is important to helping me fix/ understand my program, but i am on a full academic ride. It was the only way for me to go to college because I can't afford it otherwise.
xostephie6290ox is offline  
Old 12-10-2008, 07:33 AM   #18 (permalink)
DOOMTRAIN
 
ironpham's Avatar
 
Location: NC
I've done this before years ago. Mine wasn't limited to 4 letter words though. I will not write any program for you or give you mine, but I will explain as best as I can what you need to do (from my recollection). I'm also assuming that you are given the GUI.

When you get the word that is to be the "secret word", store it into an array. I would also suggest that you turn each letter into lower case. Make a second array and fill it with 4 underscores. This array is what will be displayed on the GUI. Now, when the user types in a letter, compare it to each letter of the secret word array. It'll be easy since you only have 4 letters. You could just pound it out instead of using a while or for loop. If there's a match, just put that letter in the correct location of the underscore array.

I don't remember anything about keeping track of letters already used, but my guess would be to set up another array that places the letters they type into it. Then just compare the next letter they type to the elements of that array. This one you'll probably need to use while/for loop.

Also, on second thought, I didn't do this for java. It was another programming class that I have no recollection of. But, this will work. And, your program so far looks pretty empty.
__________________
SIGNATURE.
ironpham is offline  
Old 12-10-2008, 07:17 PM   #19 (permalink)
The Computer Kid :D
 
Location: 127.0.0.1
Quote:
Originally Posted by xostephie6290ox View Post
well i don't see how that is important to helping me fix/ understand my program, but i am on a full academic ride. It was the only way for me to go to college because I can't afford it otherwise.
I was just wondering if you are getting a CS scholarship because you don't really seem into CS?

Honestly, I'm an engineering student, and I'm taking a pretty rough 2000-level crash course in C++ and it's gone far over my head. I really have always underestimated how hard "good" programming is, and how rare it is to find people that are really brilliant when it comes to making applications in C++. Just keep me at entry-level scripting and stuff ... I can tear it up at excel, but object-oriented programming is out of my league. I'm almost glad I took this course, because now I now for sure I don't want to be a CS major, ever.

Maybe functional stuff like Common Lisp / Scheme will help.
MikeSty is offline  
Old 12-15-2008, 09:02 AM   #20 (permalink)
Junkie
 
Location: My head.
So, did the game work and can we play it??
Xerxys is offline  
 

Tags
hangman, java


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 03:13 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360