Solved

Problems - Correcting Logic and Code Errors

Question 45

Essay

Problems - Correcting Logic and Code Errors
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
Public Class Employee
Private _strEmpId As String
Public _decSalary As Decimal
Public Property EmpId As String
Set(ByVal value As String)
_strEmpId = value
End Set
End Property
Public Property Salary As Decimal
Get
Return _decSalary
End Get
Set(ByVal value As Decimal)
Salary = value
End Set
End Property
Public Function New()
_strEmpId = String.Empty
_decSalary = 0
End Sub
End Class

Correct Answer:

verifed

Verified

Public Class Employee
Private _strEmpId...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions