Hello, i am still struggling with an assignment that was already due

The tiny tots tee-ball league has 12 players who have jersey numbers 0 through 11. The coach wants a program into which he can type a player’s number and the number of bases the player got in a turn at bat (a number 0 through 4). Write a program that allows the coach to continually enter the values until 999 is entered. Store the statistics in a two dimensional array. At the end of a data entry session, display each player’s number and the number of 0-bases, 1-base, 2-base, and 3-base, and 4-base turns the player had. Display a separate count of the number of data-entry errors the coach makes (a player number greater than 11 or a number of bases greater than 4).

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TeeBall
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        int[,] teeBall = new int[13, 5];
        private void button1_Click(object sender, EventArgs e)
        {

            string userInput, userInput2;
            
            int score, totals;
            int player;
            
            userInput = textBox1.Text;
            player = Convert.ToInt32(userInput);
            userInput2 = textBox2.Text;
            score = Convert.ToInt32(userInput2);
            clickCunt.clicks += 1;
            if (player != 999)
            {
                teeBall[player, score] += 1;
                label4.Text = teeBall[0, 1].ToString();
            }
            else
            {
                label4.Text = "nothing";
                //textBox1.Text = "";
                //textBox2.Text = "";
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            label4.Text =  "Player   0 Bases    1 Base    2 Bases     3 Bases  Home Runs";
            for (int x = 1; x < 13; x++)
            {
                label4.Text += String.Format("\n{0,10}", x);
                for (int s = 0; s < 5; s++)
                {
                    for (s = 0; s < 5; s++)
                    {
                       
                    }

                }
            }


        }

      
    }
}
class clickCunt
{
    public static int clicks = 0;
}

the results need to appear in a table after each data was entered

the results supposed to show like the picture

but i cant get the table to show the results its in UI not in console app

Attachments Screen_shot_2011-03-29_at_5.21_.31_PM_.png 141.07 KB

Shyla Last Activity: Jun 23rd, 2011

Don't hold your breath. And this thread is almost a year old.

Do you know what the code looks like I am really lost?

This article has been dead for over six months. Start a new discussion instead.