• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Help.

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
Marshal
Posts: 80874
506
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Marshal
Posts: 80874
506
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
. . . and don't use vague thread titles like "Help." Tell people what you want in the thread title.
reply
    Bookmark Topic Watch Topic
  • New Topic