Answer to Question #201134 in Visual Basic for abcdefna

Question #201134

>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.


1
Expert's answer
2021-05-31T12:49:02-0400
 '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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS