Check Please!

I have this homework problem and I just want to make sure this makes sense to someone else!! Any input is much appreciated!

Thanks
Given the following class called Student, use a word document to implement the property SAT score as a write-once property. The property takes or returns a single int32 as its parameter or output. The private element to return is pvtSATScore.

Private pvtSATScore As Int32
Public Property SATScore() As Single
Get
Return pvtSATScore
End Get
Set(ByVal Value As Single)
Static pblnSet As Boolean
If pblnSet = True Then
Throw New System.Exception
Else
pblnSet = True
pvtSATScore = Value
End If
End Set
End Property
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories