This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem with DotCom project from Head First Java 2nd edition. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with DotCom project from Head First Java 2nd edition." Watch "Problem with DotCom project from Head First Java 2nd edition." New topic
Author

Problem with DotCom project from Head First Java 2nd edition.

Brendan Klaus
Greenhorn

Joined: Dec 05, 2012
Posts: 1
Hello,

New to programming and Java. I 'm having a problem with this code.







I feel like the problem is in setupGame. Like its hanging looking for some missing input necessary to move forward.

This is the the output.

"Your goal here is to sink all the dot coms!
Try to sink them all in the fewest number of guesses.
I'm running as expected"

Thanks!

Also, I know there were some other posts about this same project, and I did look at them, but none of them seemed to match the problem I was having.



Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7491
    
  18

Gabor Ewhaas wrote:I have struggled for making the code work too. After a whlie my solution is below...

Gabor:

1. Welcome to Javaranch.
2. In future, please UseCodeTags (←click).
3. We generally don't like people to post ready-made solutions on these forums, especially in the 'Beginning Java' area. I'm sure your intentions were great, but it's far better to simply help people and let them work things out for themselves.

For the moment, I've removed your post in such a way that it can be restored if my colleagues think that I've overstepped my authority.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Gabor Ewhaas
Greenhorn

Joined: Jan 09, 2013
Posts: 2
Winston,

thank you for your honorable advices. I'm new to java and to this forums too. Next time i will do so as you said. I agree with you -- and with the common law which is expected here i mean.

Gabor
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7491
    
  18

Gabor Ewhaas wrote:thank you for your honorable advices. I'm new to java and to this forums too. Next time i will do so as you said. I agree with you -- and with the common law which is expected here i mean.

No probs; and thanks for not taking my post personally. It's simply the JavaRanch etiquette.

And please, do feel free to offer advice. That's what these forums are here for.

Winston
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with DotCom project from Head First Java 2nd edition.
 
Similar Threads
Head First Java DotCom, DotComBust, GameHelper
DotComBustGame in HFJ -- not working; can't figure out what I've missed
Head First Java Programs
Head First Java P148 - DotComBust - compile errors
Chapter 6th Head First Java, class GameHelper, method placeDotCom(int comSize)