Question
Exercises 5.1.18 SEMESTER GRADE Write a program that requests the numeric grades on a midtermexam and a finalexam and then uses a Function procedure to
Exercises 5.1.18 SEMESTER GRADE
Write a program that requests the numeric grades on a midtermexam and a finalexam and then uses a Function procedure to assign a semester grade (A, B, C, D, or F). The finalexam should count twice as much as the midtermexam, the semester average should be rounded up to the nearest whole number, and the semester grade should be assigned by the following criteria:
Use a function called Ceil that rounds non-integer numbers up to the next integer. The function Ceil can be defined by Ceil(x)=Int(x).
Partial Hints: (Challenging) Private Sub btnDetermine_Click(...) Handles btnDetermine.Click Dim midtermm, final As Double midtermm = CDbl(txtMidTermm.Text) final = CDbl(txtFinal.Text) txtSemesterGrade.Text = SemesterGrade(midtermm, final) End Sub Function SemesterGrade(midTermm As Double, final As Double) As String ' xxx fill in the missing codes End Function Function Ceil(num As Double) As Double Return -Int(-num) End Function
Figure 5.8 Possible outcome of Exercise 18. Grade Midterm exam: Final exam: 94 Determine Semester Grade Semester grade: AStep 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