Question
Visual Basic You will develop the Professor Juarez application. The application allows a teacher to select a letter grade from a Grade: list box and
Visual Basic
You will develop the Professor Juarez application. The application allows a teacher to select a letter grade from a Grade: list box and click the Display button. When this is done, a list of students with that grade are shown in a Students: list box and the total number of students with that grade are shown in a label under Number of students:
Please note the following when creating your solution:
1. Use Professor Juarez for the project name and Professor Juarez for the solution name. 2. The Windows Forms application should include the following form-related items including: The forms file name should be Main Form.vb The forms Name should be frmMain The forms start position should be center screen (StartPosition property). The form should have an appropriate form title (Text property). Set/verify the name of the startup form to frmMain 3. The grades should be presented in a Grade: list box that includes options for choosing the letters, A, B, C, D and F. The SelectionMode of the list box should be One so that only one item can be selected. 4. The Students: list box is used to present the names of the students with the selected grade. The SelectionMode should be None since this list box is for display purposes only. 5. The Number of Students should be displayed with a label. 6. You should add a File menu item with at least one entry, Exit, that exits the application. (For this assignment you must add the File->Exit menu item and code the event procedure. The Exit button is optional, so if youre using the student data files solution as a starting point, you can delete it if you wish.) 7. Use appropriate names for any controls you add, including the appropriate 3-letter ID prefixes. 8. When the form is first loaded, please make sure the first grade in the list box, A, is preselected. You can do this by setting the SelectedIndex of this listbox to 0 within the forms Load event procedure. 9. Please be sure to clear the Students: list box and the Number of Students: label whenever a new letter grade is selected from the Grades: list box. This prevents the user/teacher from seeing incorrect values is he/she selects a new letter grade but has not hit the Display button yet. 10.Code the Display button. That is, code the Display buttons Click event procedure. The data for the student names and student grades is contained within initialized arrays as follows: Dim strNames() As String = {"Helen", "Peter", "Yolanda", "Carl", "Jennifer", "Charles", "Addison", "Aiden", "Treyson", "Sydney", "Jacob", "Nancy", "George", "Ursula", "Jack"} Dim strGrades() As String = {"A", "B", "B", "A", "D", "F", "A", "B", "A", "B", "F", "C", "C", "B", "D"} you can add the arrays as shown above. When the user/teacher selects a letter grade from the Grade: list and clicks Display, your code should traverse the strGrades() array above and, whenever a matching letter grade is found in the strGrades() array, you should add the corresponding name from the strNames() array into the Students: list box and increment a counter that will count the total number of students with this grade. When youre done traversing the loop, the total number of students with this grade should be assigned to the Number of Students: label. 11.Code the Exit menu. (If you include an Exit button, code this as well. If you use the solution from the student data files the Exit button is already coded.) 12.Establish appropriate Access Keys and Tab order. 13.Add an appropriate comment header to your program and any other appropriate comments in the code. 14.Test your program. Make sure to test the Access Keys, Tab order, Exit Menu (and button, if appropriate) and Display Buttons.
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