• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Please help me - accumulating scores!

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to keep count of how many scores are entered using the enterButton, accumulate those scores and find the average score, best score and worst score. Without using arrays. But I'm kind of stuck. My code compiles but it doesn't run correctly. Can someone please help me??



Please help me!!
 
Marshal
Posts: 75857
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Start from scratch. with a pencil and paper. Write down something like this
  • Somebody enters 65
  • How many scores have I got?
  • What is the worst score to date
  • What is the best score you have to date?
  • Somebody enters a different score
  • etc
  • It is quite easy, if you break it down into tiny steps like that and think how you are going to handle each of them.
     
    Campbell Ritchie
    Marshal
    Posts: 75857
    361
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    And start with a command-line version of your application. If you can't get the functionality, adding a GUI on top simplymakes things more difficult for you.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic