Beispiel #1
0
        private void buttonNombres_Click(object sender, EventArgs e)
        {
            int acumulador = 0;


            ArregloDosDimensiones = new string[ArregloNombres.Length, 6];


            foreach (string linea in ArregloNombres)
            {
                string[] datos = linea.Split(';');

                ArregloDosDimensiones[acumulador, 0] = datos[0];
                ArregloDosDimensiones[acumulador, 1] = datos[1];
                ArregloDosDimensiones[acumulador, 2] = datos[2];
                ArregloDosDimensiones[acumulador, 3] = datos[3];
                ArregloDosDimensiones[acumulador, 4] = datos[4];
                acumulador++;
            }


            ClsArreglos ObjArreglo = new ClsArreglos(ArregloDosDimensiones);

            Nombres = ObjArreglo.MetodoBurbujaCadenas(1);

            for (int i = 1; i < ArregloDosDimensiones.GetLength(0); i++)
            {
                listBoxResultado.Items.Add(Nombres[i, 1]);
            }

            ClsNotas ObjArregloNotas = new ClsNotas();

            NotasParcial1 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 2);
            NotasParcial2 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 3);
            NotasParcial3 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 4);
            Promedio1     = ObjArregloNotas.promedios(NotasParcial1);
            Promedio2     = ObjArregloNotas.promedios(NotasParcial2);
            Promedio3     = ObjArregloNotas.promedios(NotasParcial3);
        }
Beispiel #2
0
        private void buttonNombres_Click(object sender, EventArgs e)
        {
            int acumulador = 0;


            ArregloDosDimensiones = new string[ArregloNombres.Length, 6];


            foreach (string linea in ArregloNombres)
            {
                string[] datos = linea.Split(';');

                ArregloDosDimensiones[acumulador, 0] = datos[0];
                ArregloDosDimensiones[acumulador, 1] = datos[1];
                ArregloDosDimensiones[acumulador, 2] = datos[2];
                ArregloDosDimensiones[acumulador, 3] = datos[3];
                ArregloDosDimensiones[acumulador, 4] = datos[4];
                ArregloDosDimensiones[acumulador, 5] = datos[5];
                acumulador++;
            }


            ClsArreglos ObjArreglo = new ClsArreglos(ArregloDosDimensiones);

            Nombres = ObjArreglo.MetodoBurbujaCadenas(1);

            for (int i = 1; i < ArregloDosDimensiones.GetLength(0); i++)
            {
                listBoxNombres.Items.Add(Nombres[i, 1]);
            }

            ClsArregloNotas ObjArregloNotas = new ClsArregloNotas();

            NotasParcial1 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 2);
            NotasParcial2 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 3);
            NotasParcial3 = ObjArregloNotas.MetodoBurbujaEnteros(ArregloDosDimensiones, 4);

            ClsPromedios ObjPromedios = new ClsPromedios();

            AlumnosSeccionA = ObjPromedios.Clasificar_Alumnos(ArregloDosDimensiones, "A");
            AlumnosSeccionB = ObjPromedios.Clasificar_Alumnos(ArregloDosDimensiones, "B");
            AlumnosSeccionC = ObjPromedios.Clasificar_Alumnos(ArregloDosDimensiones, "C");

            PGSAparcial1 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 2, "A");
            PGSBparcial1 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 2, "B");
            PGSCparcial1 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 2, "C");
            PGSAparcial2 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 3, "A");
            PGSBparcial2 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 3, "B");
            PGSCparcial2 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 3, "C");
            PGSAparcial3 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 4, "A");
            PGSBparcial3 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 4, "B");
            PGSCparcial3 = ObjPromedios.promedios_general_seccion(ArregloDosDimensiones, 4, "C");

            PromedioParcial1 = ObjPromedios.promedios_por_parcial(ArregloDosDimensiones, 2);
            PromedioParcial2 = ObjPromedios.promedios_por_parcial(ArregloDosDimensiones, 3);
            PromedioParcial3 = ObjPromedios.promedios_por_parcial(ArregloDosDimensiones, 4);

            sumaNotas_Alumnos     = ObjPromedios.sumatoria_general_por_alumno(ArregloDosDimensiones);
            promedioTotalSeccionA = ObjPromedios.promedios_por_seccion(sumaNotas_Alumnos, "A");
            promedioTotalSeccionB = ObjPromedios.promedios_por_seccion(sumaNotas_Alumnos, "B");
            promedioTotalSeccionC = ObjPromedios.promedios_por_seccion(sumaNotas_Alumnos, "C");
            promedio_Alumno       = ObjPromedios.PromedioTotalPorAlumno(sumaNotas_Alumnos);
        }