car.vb
来自「学习vb过程中老师讲过的所有案例!还有课程设计」· VB 代码 · 共 44 行
VB
44 行
Public Class car
Inherits vehicle
Private mycolor As String
Private mydisplacement As String
Public Overrides Property Type() As String
Get
Return "轿车"
End Get
Set(ByVal Value As String)
End Set
End Property
Public Property color() As String
Get
Return mycolor
End Get
Set(ByVal Value As String)
mycolor = Value
End Set
End Property
Public Property displacement() As String
Get
Return mydisplacement
End Get
Set(ByVal Value As String)
mydisplacement = Value
End Set
End Property
Public Sub New()
End Sub
Public Sub New(ByVal O As String, ByVal I As String, ByVal E As Integer, ByVal C As String, ByVal D As String)
MyBase.New(O, I, E)
mycolor = C
mydisplacement = D
End Sub
Public Overrides Function TellSelf() As String
Dim output As String
output = MyBase.TellSelf & "颜色=" & mycolor & "类型=" & mydisplacement
Return output
End Function
End Class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?