Question
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
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 = 5 x 4). 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 values to two public static arrays. - for loop (to control rows of TextBox) The first thing you have to do is checking if Name Textbox is 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 < 0 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started