Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If StudentData.txt file looks like this: 101,70 132,75 153,80 If a sub called student looks like this: Sub Student() Dim StudentID As Integer Dim Score

If StudentData.txt file looks like this: 101,70 132,75 153,80 If a sub called student looks like this: Sub Student() Dim StudentID As Integer Dim Score As Integer Dim TotalScore As Integer Dim Counter As Integer FileOpen(1, StudentData.txt, OpenMode.Input) Do Until EOF(1) Input(1, StudentID) Input(1, Score) TotalScore = TotalScore + Score Counter = Counter + 1 Loop FileClose(1) Dim TheGrade As String = "" Call ComputeGrade(Score, TheGrade) MsgBox(Grade for & StudentID & = & TheGrade) End Sub Sub ComputeGrade(ByVal Score As Integer, ByRef Grade As String) If Score >= 90 Then Grade = A If Score >= 80 And Score < 90 Then Grade = B If Score >= 70 And Score < 80 Then Grade = C If Score >= 60 And Score < 70 Then Grade = D If Score < 60 Then Grade = F End Sub

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions