Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Programming . Assignment 5 - Arrays (Due March 8, Monday, 11:59 pm) Suppose a teacher has five students who have taken four tests. The

Visual Programming image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
. Assignment 5 - Arrays (Due March 8, Monday, 11:59 pm) 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. Test Score Letter Grade 90-100 80-89 B 70-79 60-69 D 0-59 F Create an application that uses an array of strings to hold 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. Grade Book Name Average Grade LL Edit Student Data Calculate Grade Averages Close 2. When a user clicks the Edit Student Data button, the Edit Student Data form should be displayed like below. X Edit Student Data Name Test Scores 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Save Changes Reset Data Close Edit Student Data Calculate Grade Averages Close 3. Enter five students' information and click the Save Changes button. Edit Student Data Name Test Scores 91 89 78 67 Tiger Mary 89 92 97 82 Andrea 89 71 67 84 Betty 79 89 95 93 Simon 90 98 68 85 Save Changes Reset Data Closo Edit Student Dota Calculate Grade Averagen Close 4. Close the Edit Student Data form and click Calculate Grade Average button to display five student's' name, average. and Grade. X Grade Book Name Grade Average 81.2 B Tiger 90 A Mary Andrea 777 Betty 89 B 85.2 B Simon Edit Student Dota Calculate Grade Averages Close - MainForm - 15 output Labels - StudentForm - 25 textboxes You should name these controls just like an array index Name output Labels as lblName, lblName1 ... IblAverageO, IblAverage 1 ... IbiGradeo, IbiGrade1.... Name input textboxes as txtName, txtName1, txtName2.txtScoreO_0, txtScore0_1.... txtScore1_0, txtScore1_1.... Edit Student Data Grade Book X Name Test Scores Name Average Grade Tiger 91 89 78 67 Tiger 81.2 B Mary 89 92 97 82 Mary 90 A Andrea 89 71 67 84 Andrea 77.7 79 Betty 89 95 93 Simon 90 98 68 85 Betty 89 B Simon 85.2 B Save Changes Reset Dato Close Edit Student Data Calculate Grade Averages Close Edit Student Data Calculate Grade Averages Close "All the calculation is done in the MainForm and input validation and saving them into two public arrays should be done in StudentForm. Code programming (MainForm) - You can create Public 1-dimensional names string array and 2 dimensional scores integer array in the MainForm, but if possible, create them in a Module. - When calculate average (double values), always check if names array is empty or not to avoid unnecessary calculation Once average is obtained, call Grade function by passing average and the function returns "A"F* - average output should be displayed as two decimal places (ToString'")) * Code programming (Student Form - Create a 2 dimensional scores string array in class-level. Once textbox string values are entered in this array, you can use For Next loop to save coding time Create a Sub procedure to insert textbox values to Public name string array and class-level scores string array. You can't use any loop in this case, so 25 assign statements are required - a validation function should use a nested For Next loop to handle 2-dimensional scores string array For Loop checks it a name textbox is empty, and then if not empty, the nested For Loop (for column) should pass Scores string values of the row to another function. The function receives a string value and check if it can be converted into an integer value between 0 and 100. Then, the function should return True or False. In case of error, send a pop-up error message - Save button event handler should begin with calling a Sub for inserting values to two arrays then if validation function is true, then use a nested For Loop to convert all scores string array values to Public scores integer array, Whenever you deals with nested For Loop for scores, always check if names array of the row is empty or not. If name array is empty, conversion of score will create an error Reset button event handler requires 25 textbox clear statements - you can't use Loop here Good luck with 15 output Labels, 25 input TextBoxes, and 3 arrays, . Assignment 5 - Arrays (Due March 8, Monday, 11:59 pm) 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. Test Score Letter Grade 90-100 80-89 B 70-79 60-69 D 0-59 F Create an application that uses an array of strings to hold 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. Grade Book Name Average Grade LL Edit Student Data Calculate Grade Averages Close 2. When a user clicks the Edit Student Data button, the Edit Student Data form should be displayed like below. X Edit Student Data Name Test Scores 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Save Changes Reset Data Close Edit Student Data Calculate Grade Averages Close 3. Enter five students' information and click the Save Changes button. Edit Student Data Name Test Scores 91 89 78 67 Tiger Mary 89 92 97 82 Andrea 89 71 67 84 Betty 79 89 95 93 Simon 90 98 68 85 Save Changes Reset Data Closo Edit Student Dota Calculate Grade Averagen Close 4. Close the Edit Student Data form and click Calculate Grade Average button to display five student's' name, average. and Grade. X Grade Book Name Grade Average 81.2 B Tiger 90 A Mary Andrea 777 Betty 89 B 85.2 B Simon Edit Student Dota Calculate Grade Averages Close - MainForm - 15 output Labels - StudentForm - 25 textboxes You should name these controls just like an array index Name output Labels as lblName, lblName1 ... IblAverageO, IblAverage 1 ... IbiGradeo, IbiGrade1.... Name input textboxes as txtName, txtName1, txtName2.txtScoreO_0, txtScore0_1.... txtScore1_0, txtScore1_1.... Edit Student Data Grade Book X Name Test Scores Name Average Grade Tiger 91 89 78 67 Tiger 81.2 B Mary 89 92 97 82 Mary 90 A Andrea 89 71 67 84 Andrea 77.7 79 Betty 89 95 93 Simon 90 98 68 85 Betty 89 B Simon 85.2 B Save Changes Reset Dato Close Edit Student Data Calculate Grade Averages Close Edit Student Data Calculate Grade Averages Close "All the calculation is done in the MainForm and input validation and saving them into two public arrays should be done in StudentForm. Code programming (MainForm) - You can create Public 1-dimensional names string array and 2 dimensional scores integer array in the MainForm, but if possible, create them in a Module. - When calculate average (double values), always check if names array is empty or not to avoid unnecessary calculation Once average is obtained, call Grade function by passing average and the function returns "A"F* - average output should be displayed as two decimal places (ToString'")) * Code programming (Student Form - Create a 2 dimensional scores string array in class-level. Once textbox string values are entered in this array, you can use For Next loop to save coding time Create a Sub procedure to insert textbox values to Public name string array and class-level scores string array. You can't use any loop in this case, so 25 assign statements are required - a validation function should use a nested For Next loop to handle 2-dimensional scores string array For Loop checks it a name textbox is empty, and then if not empty, the nested For Loop (for column) should pass Scores string values of the row to another function. The function receives a string value and check if it can be converted into an integer value between 0 and 100. Then, the function should return True or False. In case of error, send a pop-up error message - Save button event handler should begin with calling a Sub for inserting values to two arrays then if validation function is true, then use a nested For Loop to convert all scores string array values to Public scores integer array, Whenever you deals with nested For Loop for scores, always check if names array of the row is empty or not. If name array is empty, conversion of score will create an error Reset button event handler requires 25 textbox clear statements - you can't use Loop here Good luck with 15 output Labels, 25 input TextBoxes, and 3 arrays

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 27th International Conference Dasfaa 2022 Virtual Event April 11 14 2022 Proceedings Part 2 Lncs 13246

Authors: Arnab Bhattacharya ,Janice Lee Mong Li ,Divyakant Agrawal ,P. Krishna Reddy ,Mukesh Mohania ,Anirban Mondal ,Vikram Goyal ,Rage Uday Kiran

1st Edition

3031001257, 978-3031001253

More Books

Students also viewed these Databases questions

Question

3. Explain the forces that influence how people handle conflict

Answered: 1 week ago