Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me - accumulating scores!

 
Tayler Mac
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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!!
 
Campbell Ritchie
Sheriff
Pie
Posts: 48953
60
  • Mark post as helpful
  • send pies
  • 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
    Sheriff
    Pie
    Posts: 48953
    60
    • Mark post as helpful
    • send pies
    • 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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic