Jamesc
Member
- Joined
- Oct 26, 2011
- Messages
- 7
- Programming Experience
- Beginner
I have a project that you enter someone's name, home town and initials saves it to an array which later is produce into a pie chart.
The question is:
The class has one method called addCompetitor that takes String parameters to indicate a name, home town and initials, and an Integer to indicate the position in the tournament. The method creates a Competitor object and stores it in the corresponding element of the position array.
Any help?
The question is:
The class has one method called addCompetitor that takes String parameters to indicate a name, home town and initials, and an Integer to indicate the position in the tournament. The method creates a Competitor object and stores it in the corresponding element of the position array.
VB.NET:
Public Class Cakes
Dim position(7) As Integer
Dim amountSold(7) As Double
Dim noOfCompetitors As Integer
Public Sub New()
noOfCompetitors = 0
End Sub
Public WriteOnly Property inputSold() As Double
Set(ByVal value As Double)
amountSold(noOfCompetitors) = value
End Set
End Property
Public ReadOnly Property getNoOfCompetitors() As Integer
Get
Return noOfCompetitors
End Get
End Property
Public ReadOnly Property getCompetitor() As Integer
Get
Return position
End Get
End Property
[COLOR=#ff0000] [/COLOR]
End Class
Any help?
Last edited: