>Declare a variable to store 12 models of a car in a local car dealer.
>Declare a user defined data type to store an student information consisting his name, matric number, test1 score and test2 score.
'Declare a variable to store 12 models of a car in a local car dealer.
Dim carsModels() = {"Volkswagen", "BMW", "Rolls-Royce", "Bentley", "Audi", "Bugatti", "Porsche", "SEAT", "Lamborghini", "Skoda", "MAN", "Scania"}
'Declare a user defined data type to store an student information consisting his name, matric number, test1 score and test2 score.
Class Student
Private _name As String
Private _matricNumber As String
Private _test1Score As Integer
Private _test2Score As Integer
''' <summary>
''' Constructor
''' </summary>
''' <remarks></remarks>
Sub New()
End Sub
''' <summary>
''' Constructor
''' </summary>
''' <param name="name"></param>
''' <param name="matricNumber"></param>
''' <param name="test1Score"></param>
''' <param name="test2Score"></param>
''' <remarks></remarks>
Sub New(ByVal name As String, ByVal matricNumber As String, ByVal test1Score As Integer, ByVal test2Score As Integer)
Me._name = name
Me._matricNumber = matricNumber
Me._test1Score = test1Score
Me._test2Score = test2Score
End Sub
End Class
Comments
Leave a comment