Question: Open Visual Basic and create a new Project. Select Windows Form New Project window. You will save this project in your CS 3 folder and

  1. Open Visual Basic and create a new Project. Select Windows Form New Project window. You will save this project in your CS 3 folder and name it as: yourlastname-firstname-Grader.
  2. In this project user inputs three test scores, a button calculates the average and displays the average and grade. Another button clears the entries.
  3. Create a form with seven labels, threetextboxes and two buttons, similar to below form layout with each control.
  4. Here are the properties of the form and each control:
  5. Form: change the title of the form to: - Grader
  6. Label1, Text: Test1; Name: leave as is, you dont use labels in the program
  7. Label2, Text: Test2; Name: leave as is
  8. Label3, Text: Test3; Name: leave as is
  9. Label4, Text: Average; Name: leave as is
  10. Label5, Text: Grade; Name: leave as is
  11. Label6, Text: blank; Name: lblAverage ; BorderStyle: Fixed 3D; AutoSize: False
  12. Label7, Text: blank; Name: lblGrade ; BorderStyle: Fixed 3D; AutoSize: False
  13. Textbox1, Test: blank; Name: txtTest1
  14. Textbox2, Test: blank; Name: txtTest2
  15. Textbox3, Test: blank; Name: txtTest3
  16. Button1, Text: Calculate Average; Name: btnCalcAvg
  17. Button2, Text: Clear; Name: btnClear
  18. Write a Visual Basic program that: 1) accepts three scores, 2) computes the average and assigns the grade.
  19. You declare four variables as Integer data type. They are: Test1, Test2, Test3, and Average.
  20. You create an IFELSEIF structure to assign grades using this logic:
  21. Average
  22. To do this you program Calculate Average button to store Test1, Test2, and Test3 entries from textboxes in variables, then calculate the Average and based on the Average assign a Grade.
  23. Clear button clears the entries in Test1, Test2, Test3 textboxes and in Average and Grade labels. Ready to enter another set of numbers.
  24. After creating the following form layout in VB (see assignment 8 on how to create a new project). Make sure to name the controls according to above.
  25. Double-click on Calculate Average and develop a code:
  26. Declare 4 variables: test1, test2, test3, average as Integer.
  27. Assig Test1, Test2, and Test3 values that are entered in textboxes to three test1, test2, and test3 variables.
  28. Calculate Average, develop an expression to sum three tests values and divide by 3.
  29. Then develop nested IF THEN ELSEIF ELSEIF selection structure to evaluate Average and assign a Grade.
  30. You display the average and assigned grade in Average and Grade label controls
  31. We have reviewed similar nested selection structure in Selection slides.
  32. You may want to start with a similar code below. Dont forget to declare the variables and assign Test1, Test2, Test3 to their corresponding variables. Also calculating the Average of three tests:

If Average Then

lblAvg.Text = Average

lblGrade.Text = "F"

ElseIf Average Then

lblAvg.Text = Average

lblGrade.Text = "D"

ElseIf Average Then

lblAvg.Text = Average

lblGrade.Text = "C"

ElseIf Average Then

lblAvg.Text = Average

lblGrade.Text = "B"

ElseIf Average Then

lblAvg.Text = Average

lblGrade.Text = "A"

End If

  1. To program Clear button, double-click on Clear button on the form
  2. Type the code to clear the textboxes and label controls:
  3. You can use the following code:

txtTest1.Text = ""

txtTest2.Text = ""

txtTest3.Text = ""

lblAvg.Text = ""

lblGrade.Text = ""

Form layout with controls

 Open Visual Basic and create a new Project. Select Windows Form

To receive credit for this assignment, submit yourlastname-firstname-Grader.pdf in this Assignment, such that your pdf file contains the screenshots of all the execution steps. Only ONE file, please.

Your Name - Grader Label1 Label2 Label3 Label4 Textboxi Textbox2 Textbox3 Test 1 Test 2 Test 3 Average Grade _Label6 Label7 Button| |-- > Button2 Calculatee Average 9 Clear

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!