Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Visual Basic help!!! Please translate this code into pseudocode/structured Engli

ID: 3794489 • Letter: V

Question

Visual Basic help!!! Please translate this code into pseudocode/structured English.

Dim abbreviation As String

abbreviation = CStr(txtAbbreviation.Text)

Select Case abbreviation

            Case “ac”

                        txtMeaning.Text = “before meals”

            Case “ad lib”

                        txtMeaning.Text = “freely as needed”

            Case “bid”

                        txtMeaning.Text = “twice daily”

            Case “gtt”

                        txtMeaning.Text = “a drop”

            Case “hs”

                        txtMeaning.Text = “at bedtime”

            Case “qid”

                        txtMeaning.Text = “four times a day”

            Case Else

                        txtMeaning.Text = “Enter a proper abbreviation”

End Select

Explanation / Answer

Ans. Pseudocode:

alias abreviation = string
store contents of file txtAbbreviation.txt as string
if content = ac:
   text = before meals
if content = ad lib:
   text = freely as needed
if content = bid:
   text = twice daily
if content = gtt:
   text = a drop
if content = hs:
   text = at bedtime
if content = qid:
   text = four times a day
else:
   text = Enter a proper abbreviation