This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Help. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help." Watch "Help." New topic
Author

Help.

Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
Ive completed my program which works fine. But im not happy with it. It looks a mess and very poorly written. Especially my methods.

Any help on how i can improve on this?



Stephen Foy - Microsoft Application Development Consultant
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
Well, not knowing what the rules of the game are supposed to be, it is difficult to tell what you are doing wrong in your methods.
I agree with you however; you do need to tidy it up. You have capitalisation wrong, you have some if . . . {} blocks all written as one line, you seem to be creating your Scanner object and a dice() object several times.
You don't need the java.math.*; import; you aren't using either of the java.math classes. And if I say any more, I shall expect you to share the marks with me
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
. . . and don't use vague thread titles like "Help." Tell people what you want in the thread title.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help.
 
Similar Threads
dice game
Using Methods in methods
So far...
catch statements
DiceGame Code - which is better?