Introduction(VISUAL BASICS)THANK YOU In this assignment, you will be writing a V
ID: 3677638 • Letter: I
Question
Introduction(VISUAL BASICS)THANK YOU
In this assignment, you will be writing a Visual Basic command-line program that calculates the score needed on the final exam to receive an A, B, C, or D in the course. Assume that the student entering his/her grades into the program has completed every assignment in the class except the final exam.
Assignment
Write a Visual Basic console program that calculates the scored needed on the final exam to receive an A, B, C and D letter grade for the entire course. Consult the class syllabus for the grade calculation method used. The program will present the user with multiple prompts asking for the score received on the three programming projects and the midterm exam. Additionally, the user will enter the number of absences he/she has from class (not the attendance/participation points score). After entering these items, the program will project the scores needed on the final exam to get different letter grades for the course. The output should be printed in an aesthetically pleasing, organized table on the console.
Use the following set of inputs when running the program to generate screenshots:
Trial #1
Trial #2
Trial #3
Project #1
200
75
90
Project #2
200
90
85
Project #3
200
120
-30 (then 30)
Midterm
150
110
0
Total Absences
0
2
5
Hints
You may want to consult the String manipulator methods to assist in lining up output in the summary table. In particular, String.PadRight() may prove to be extremely useful.
Trial #1
Trial #2
Trial #3
Project #1
200
75
90
Project #2
200
90
85
Project #3
200
120
-30 (then 30)
Midterm
150
110
0
Total Absences
0
2
5
EL CAWindowssystem32cmd.exe Please enter your grade for project 111 0-200 200 Please enter your grade for project 112 0-200 200 Please enter your grade for project 113 0-200 200 Please enter your grade one the midterm exam X0-150 150 How many days of class did you miss C0-30 GRADE SUMMARY Project 101 200 Project 1102 200 200 Project #03 Midterm Exam 150 Participation 100 TOTAL SCORE SO FAR 850 Desired Grade Points Needed Percentage Needed on Final 50 50 33.33 150 100.00 250 166.67 Any score below 166.67 on the final will result in a failing grade for the course Press any key to continueExplanation / Answer
Public Class Grade
Declare total As Double
Declare grade As String
Declare name as String
Declare grade1 as double
Declare grade2 as double
Declare grade3 as double
Private Sub Grade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGrade.Click
Input(Name)
Input(Grade1, Grade2, Grade3)
Display(name),":", determineGrade()
End Sub
Function determineGrade() As String
If (grade1) < (grade2) Then
If (grade1) < (grade3) Then
total = ((grade3) + (grade2)) / 2
Else
total = ((grade1) + (grade2)) / 2
End If
Else
If (grade2) < (grade3) Then
total = ((grade1) + (grade3)) / 2
Else
total = ((grade1) + (grade2)) / 2
End If
End If
If total >= 90 And total <= 100 Then
grade = "A"
ElseIf total >= 80 Then
grade = "B"
ElseIf total >= 70 Then
grade = "C"
ElseIf total >= 60 Then
grade = "D"
End If
Return grade
End Function
End Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.