This code defines a class called "Computer" that contains variables to track whether a computer is beeping or its hard drive is spinning. Based on user input for those two variables, the code displays one of four possible messages to advise on troubleshooting steps: contact tech support if both issues occur, check drive contacts if just beeping, bring to repair center if neither, or check speaker connections if just the hard drive is spinning.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
76 views
Exercise 5 Word
This code defines a class called "Computer" that contains variables to track whether a computer is beeping or its hard drive is spinning. Based on user input for those two variables, the code displays one of four possible messages to advise on troubleshooting steps: contact tech support if both issues occur, check drive contacts if just beeping, bring to repair center if neither, or check speaker connections if just the hard drive is spinning.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Public Class Computer
Dim computerbeep As Char
Dim harddrivespin As Char Private Sub whattodo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles whattodo.Click computerbeep = boxbeep.Text harddrivespin = boxspin.Text If computerbeep = "Y" And harddrivespin = "Y" Then final.Text = "Contact tech support." ElseIf computerbeep = "Y" And harddrivespin = "N" Then final.Text = "Check drive contacts." ElseIf computerbeep = "N" And harddrivespin = "N" Then final.Text = "Bring computer to repair center." ElseIf computerbeep = "N" And harddrivespin = "Y" Then final.Text = "Check the speaker connections." End If End Sub End Class