This code defines a class called "Computer" that contains variables to store whether a computer is beeping or its hard drive is spinning. Based on the values of these variables, the code displays different messages to troubleshoot issues: it tells the user to contact support if both are happening, check drive contacts if just beeping, bring it to a repair center if neither, or check speaker connections if just the hard drive is spinning.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
78 views1 page
Exercise 17
This code defines a class called "Computer" that contains variables to store whether a computer is beeping or its hard drive is spinning. Based on the values of these variables, the code displays different messages to troubleshoot issues: it tells the user to contact support if both are happening, check drive contacts if just beeping, bring it to a repair center if neither, or check speaker connections if just the hard drive is spinning.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
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 MessageBox.Show("Contact tech support.", "Statis") ElseIf computerbeep = "Y" And harddrivespin = "N" Then MessageBox.Show("Check drive contacts.", "Statis") ElseIf computerbeep = "N" And harddrivespin = "N" Then MessageBox.Show("Bring computer to repair center.", "Statis") ElseIf computerbeep = "N" And harddrivespin = "Y" Then MessageBox.Show("Check the speaker connections.", "Statis") End If End Sub End Class