Remember : A Child cannot exist without a parent!!
Public Class Car
InheritsVehicle
Private _intNumberOfPassengers As Integer
Public Sub New(Make As String, Model As String, RegNumber As Integer,RegExpiryDate As Integer)
MyBase.New(make,model,RegNumber,RegExpiryDate)
_intNumberOfPassengers=NumberOfPassengers
Public Sub New(Make As String, Model As String, RegNumber As Integer,RegExpiryDate As Integer,GeneralNotes As String, NumberOfPassengers As Integer)
MyBase.New(make,model,RegNumber,RegExpiryaDate,GeneralNotes)
int_NumberOfPassengers=NumberOfPassengers
Public Function getNumberOfPassengers()AsInteger
Return_intNumberOfPassengers
End Function
Public Sub setNumberOfPassengers(NumberOfPassengers As Integer)
_intNumberOfPassengers=NumberOfPassengers
End Sub
Public Sub AddToPassengers(NumberOfPassengers As Integer)
_intNumberOfPassengers +=NumberOfPassengers
End Class
____________________________________________________
Public Class MotorBike
InheritsVehicle
Public Sub New(Make As String, Model As String, RegNumber As Integer,RegExpiryDate As Integer)
Public Sub New(Make As String, Model As String, RegNumber As Integer,RegExpiryDate As Integer,GeneralNotes As String, NumberOfPassengers As Integer)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment