Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Help with 2d Array Code

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help with 2d Array Code

    Hi, So I have to write this program that prints takes the information I provided and put it with each tutor and prints out the max students that went to tutoring, how many students each tutor had, how many they saw each day etc..

    The important part is that I have to have a void method that prints the tutor totals for each day and each tutor like so Screen Shot 2014-04-21 at 1.12.43 PM.jpg

    My problem is that when I call the method to print it for each tutor I can either get only one tutors name to come up in 4 lines with all the different numbers like so (look at the bottom output, also you can see where I call the print totals method and declare it) Screen Shot 2014-04-21 at 1.15.01 PM.jpg

    But if I try to print out the line 4 times, once for each tutor, it prints everything 16 times. I just need it to be one time for each tutor like the first attached image.

    Thank You!


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Help with 2d Array Code

    Post code in the form of an SSCCE, not a screenshot. We can't debug a screenshot.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 4
    Last Post: November 14th, 2011, 10:00 PM
  2. Please help with array code
    By senecawolf in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 12th, 2011, 02:01 AM
  3. Help with array code.
    By beginnerjava in forum What's Wrong With My Code?
    Replies: 6
    Last Post: July 2nd, 2011, 05:50 AM
  4. Array Code Help
    By whattheeff in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 21st, 2011, 04:44 PM
  5. Need help with array code
    By n00bprogrammer in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 6th, 2010, 10:54 PM

Tags for this Thread