• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help printing output

 
Troy Johnson
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again. I am having trouble figuring out how to print and display the output of my code. I am trying to display the information when the program runs in the following manor:
Team 1 is up to bat:
Jason Crisp (average = 300.0) is out.
Rusty Johnson (average = 170.0) gets a hit.
Team 2 is up to bat:
Kevin McArthur (average = 375.0) is out.
Jason Harpham (average = 210.0) is out.
Could anyone offer any other suggestions or insight to what I am doing wrong. Thanks again.
Here is my code:
 
Lisa D'Aniello
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At first glance, you're storing all of your player data in the same array index.
Hope this helps a little bit,
Lisa M.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic