Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c# 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
c#
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 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