I did everything wrong someone help
Input button procedure.
1. You should clear the names and scores
arrays.
2. If name textbox is empty, the entire row should be skippted without processing score textbox in the same row.
+
3. if a score textbox has non-integer number or less than O or greater than 100, the whole process should stop and display error
Form1:
- if a name row is empty, the entire row should be left blank.
- MessageBox.Show("Enter a number between O and 100");
Form1 is output form, there is no place to enter any number. Remove this statement.
Fix mistakes
bid btnAverage_click(object sender, EventArgs e) ]=(grades[,]+grades[0,1]+grades[,2]+grades[0,3]+grades[0,4])/5;]=(grades[1,0]+grades[1,1]+grades[1,2]+grades[1,3]+grades[1,4])/5;2]=(grades[2,0]+grades[2,1]+grades[2,2]+grades[2,3]+grades[2,4])/5;3]=(grades[3,]+grades[3,1]+grades[3,2]+grades[3,3]+grades[3,4])/5;4]=(grades[4,]+grades[4,1]+grades[4,2]+grades[4,3]+grades[4,4])/5; . Text = Convert. . ostring (grade[]); Text = Convert. Tostring(grade[1]); Text = convert. Tostring (grade [2]); . Text = convert. Tostring (grade [3]); Text = convert . Tostring (grade[4]); 1. Text = Convert/tostring (avg [O]); 2. Text = convent ( Tostring (avg [1]); 3. Text = Convert, Tostring (avg (2]); 4. Text = Eonveff, fostwing (avg [3]); D. Text = convert - ostring (avg(4]); assignment in this class. To code it correctly, you must completely understand how to declare and use 1-D and 2-D arrays. If you are not sure how to declare array or use he array, then stop this assignment, study and master rrays first. Also, you should completely understand the raphic control arrays (such as textbox or label arrays). Then, the first step in this assignment is to send or store all the textbox inputs to public static 1-D and 2-D arrays of Form1. You should create public static 1-D string array (for names) and pulic 2-D array (for scores). The array size should be the number of textboxes in the Student Data form ( name =5, score =54). Once you declare two public static arrays in the Form1, you have to send the TextBox data into these arrays. In the Save Changes button procedure, Declare local TextBox array txtNames, and another 2-D TextBox array txtScores. Both TextBox arrays should be immediately initialized with all the textbox names. Then, create an integer variable intDummy. This variable will be used in TryParse input validation routine to hold the integer value. Now, you have to start a nested for loop to send all the alues to two public static arrays. for loop (to control rows of TextBox) he first thing you have to do is checking if Name Textbox empty or not. You can use String.isNullor Empty() method as a condition in the if statement. If empty, then skip to the next iteration (for the next row) if not empty, then assign the value to Form1.strNames array. Then, begin the nested for loop to validate and store scores to Form1.intScores array. - nested for loop (to control columns of TextBox) Use if TryParse statement to validate the input, out variable should be intDummy. If the TryParse( )== false, or intDummy 100, then display error message and return to terminate procedure. Otherwise, you should assign the intDummy value to Form1.intScores [r,c]//r and c is the count variable of two for loops. Once you successfully complete this first step, all the data are transferred to two arrays of Form1. Then, the next step is to use these array values to calculate averages and letter grades in the Form1. Suppose a teacher has five students who have taken four tests. The teacher uses the following grading scales to assign a letter grade to a student, based on the average of his or her four test scores. the five student names, an array of five strings to hold each student's letter grades, and five arrays of four single precision numbers to hold each student's set of test scores. Equip the application with a set of buttons that allows the application to perform the following: - Display a form that allows the user to enter or change the student names and their test scores. - Calculate and display each student's average test score and a letter grade based on the average. Input validation: Do not accept test scores less than zero or greater than 100. 1. This is the main form. When a user clicks the Edit Student Data button, the bel 3. Ent Ch: Close the Edit Student Data form and click ! bid btnAverage_click(object sender, EventArgs e) ]=(grades[,]+grades[0,1]+grades[,2]+grades[0,3]+grades[0,4])/5;]=(grades[1,0]+grades[1,1]+grades[1,2]+grades[1,3]+grades[1,4])/5;2]=(grades[2,0]+grades[2,1]+grades[2,2]+grades[2,3]+grades[2,4])/5;3]=(grades[3,]+grades[3,1]+grades[3,2]+grades[3,3]+grades[3,4])/5;4]=(grades[4,]+grades[4,1]+grades[4,2]+grades[4,3]+grades[4,4])/5; . Text = Convert. . ostring (grade[]); Text = Convert. Tostring(grade[1]); Text = convert. Tostring (grade [2]); . Text = convert. Tostring (grade [3]); Text = convert . Tostring (grade[4]); 1. Text = Convert/tostring (avg [O]); 2. Text = convent ( Tostring (avg [1]); 3. Text = Convert, Tostring (avg (2]); 4. Text = Eonveff, fostwing (avg [3]); D. Text = convert - ostring (avg(4]); bid btnAverage_click(object sender, EventArgs e) ]=(grades[,]+grades[0,1]+grades[,2]+grades[0,3]+grades[0,4])/5;]=(grades[1,0]+grades[1,1]+grades[1,2]+grades[1,3]+grades[1,4])/5;2]=(grades[2,0]+grades[2,1]+grades[2,2]+grades[2,3]+grades[2,4])/5;3]=(grades[3,]+grades[3,1]+grades[3,2]+grades[3,3]+grades[3,4])/5;4]=(grades[4,]+grades[4,1]+grades[4,2]+grades[4,3]+grades[4,4])/5; . Text = Convert. . ostring (grade[]); Text = Convert. Tostring(grade[1]); Text = convert. Tostring (grade [2]); . Text = convert. Tostring (grade [3]); Text = convert . Tostring (grade[4]); 1. Text = Convert/tostring (avg [O]); 2. Text = convent ( Tostring (avg [1]); 3. Text = Convert, Tostring (avg (2]); 4. Text = Eonveff, fostwing (avg [3]); D. Text = convert - ostring (avg(4]); assignment in this class. To code it correctly, you must completely understand how to declare and use 1-D and 2-D arrays. If you are not sure how to declare array or use he array, then stop this assignment, study and master rrays first. Also, you should completely understand the raphic control arrays (such as textbox or label arrays). Then, the first step in this assignment is to send or store all the textbox inputs to public static 1-D and 2-D arrays of Form1. You should create public static 1-D string array (for names) and pulic 2-D array (for scores). The array size should be the number of textboxes in the Student Data form ( name =5, score =54). Once you declare two public static arrays in the Form1, you have to send the TextBox data into these arrays. In the Save Changes button procedure, Declare local TextBox array txtNames, and another 2-D TextBox array txtScores. Both TextBox arrays should be immediately initialized with all the textbox names. Then, create an integer variable intDummy. This variable will be used in TryParse input validation routine to hold the integer value. Now, you have to start a nested for loop to send all the alues to two public static arrays. for loop (to control rows of TextBox) he first thing you have to do is checking if Name Textbox empty or not. You can use String.isNullor Empty() method as a condition in the if statement. If empty, then skip to the next iteration (for the next row) if not empty, then assign the value to Form1.strNames array. Then, begin the nested for loop to validate and store scores to Form1.intScores array. - nested for loop (to control columns of TextBox) Use if TryParse statement to validate the input, out variable should be intDummy. If the TryParse( )== false, or intDummy 100, then display error message and return to terminate procedure. Otherwise, you should assign the intDummy value to Form1.intScores [r,c]//r and c is the count variable of two for loops. Once you successfully complete this first step, all the data are transferred to two arrays of Form1. Then, the next step is to use these array values to calculate averages and letter grades in the Form1. Suppose a teacher has five students who have taken four tests. The teacher uses the following grading scales to assign a letter grade to a student, based on the average of his or her four test scores. the five student names, an array of five strings to hold each student's letter grades, and five arrays of four single precision numbers to hold each student's set of test scores. Equip the application with a set of buttons that allows the application to perform the following: - Display a form that allows the user to enter or change the student names and their test scores. - Calculate and display each student's average test score and a letter grade based on the average. Input validation: Do not accept test scores less than zero or greater than 100. 1. This is the main form. When a user clicks the Edit Student Data button, the bel 3. Ent Ch: Close the Edit Student Data form and click ! bid btnAverage_click(object sender, EventArgs e) ]=(grades[,]+grades[0,1]+grades[,2]+grades[0,3]+grades[0,4])/5;]=(grades[1,0]+grades[1,1]+grades[1,2]+grades[1,3]+grades[1,4])/5;2]=(grades[2,0]+grades[2,1]+grades[2,2]+grades[2,3]+grades[2,4])/5;3]=(grades[3,]+grades[3,1]+grades[3,2]+grades[3,3]+grades[3,4])/5;4]=(grades[4,]+grades[4,1]+grades[4,2]+grades[4,3]+grades[4,4])/5; . Text = Convert. . ostring (grade[]); Text = Convert. Tostring(grade[1]); Text = convert. Tostring (grade [2]); . Text = convert. Tostring (grade [3]); Text = convert . Tostring (grade[4]); 1. Text = Convert/tostring (avg [O]); 2. Text = convent ( Tostring (avg [1]); 3. Text = Convert, Tostring (avg (2]); 4. Text = Eonveff, fostwing (avg [3]); D. Text = convert - ostring (avg(4])