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: i'm stack, have no idea how to continue this. Help

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry i'm stack, have no idea how to continue this. Help

    So far i have this,
    but i feel like i'm doing it wrong.
    /**
    The main program will create an array of 3 myTeam objects. For loop will load up the instance variables 
    for the object by calling the setTeam, setWinsLosses, addPointsFor, and addPointsAgainst methods. 
    I need to do scan inputs to get the data passed to those methods.
    Another for loop will be used to print all the data from the object using the getTeam, getWins, getLosses, 
    and getAllPoints methods.
    */
     
     
    public class BasketballHW7 {
     
     
     
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
     
     
    		@SuppressWarnings("resource")
    		Scanner scanInput = new Scanner(System.in);	
    		myTeam oTeam[] = new myTeam[3]; // creates arrays of three dimensions  
     
     
    		int iCount; // declaring counter variable
     
     
    		for (iCount =0; iCount < 3; iCount++); // for loop to gather information of the three teams
    		{
    			oTeam[iCount] = new myTeam ();
    		}
     
    		for (iCount =0; iCount < 3; iCount++);
    			System.out.println("Enter the team name.");
    			System.out.println();
    			oTeam[0].setTeam(scanInput.nextLine());
     
    			System.out.println("Number of wins?");
    			iCount = scanInput.nextInt();
    			System.out.println();
    Last edited by helloworld922; March 7th, 2013 at 01:17 AM. Reason: please use [code] tags


  2. #2
    Member Zyrion's Avatar
    Join Date
    Feb 2013
    Location
    Iowa
    Posts
    106
    My Mood
    Angelic
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default Re: i'm stack, have no idea how to continue this. Help

    What exactly are you having problems with? What do you think you are doing wrong?

Similar Threads

  1. Help with interrupting a loop without break or continue
    By mwr76 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 11th, 2011, 08:51 PM
  2. Can't get lines to cut at 60 characters and continue on next line right
    By JavaN00b in forum What's Wrong With My Code?
    Replies: 10
    Last Post: May 22nd, 2011, 09:44 AM
  3. Stack
    By AmyH in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 7th, 2010, 04:04 PM
  4. continue statements
    By monroe in forum Java Applets
    Replies: 1
    Last Post: March 20th, 2010, 06:26 PM
  5. How to make user press enter to continue in program?
    By BC2210 in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: October 3rd, 2009, 05:08 AM

Tags for this Thread