' Tda clsVehicle 
Public typeVehicle As String
Public brand As String
Public year As Integer
Public capacity As Integer
Public maxSpeed As Integer

' Metoda pro zapsn informac o vozidle
Public Sub SetVehicleInfo(ByVal typeVehicle As String, ByVal brand As String, ByVal year As Integer, ByVal capacity As Integer, ByVal maxSpeed As Integer)
    Me.typeVehicle = typeVehicle
    Me.brand = brand
    Me.year = year
    Me.capacity = capacity
    Me.maxSpeed = maxSpeed
End Sub

' Metoda pro zobrazen informac o vozidle
Public Function GetVehicleInfo() As String
    GetVehicleInfo = "Typ Vozidla: " & typeVehicle & ", Znaka: " & brand & "(" & year & "), Kapacita: " & capacity & " osob, Max rychlost: " & maxSpeed & " km/h"
End Function

Sub Vehicle()
    ' Deklarace objekt tdy Vehicle
    Dim Car As clsVehicle
    Dim Bus As clsVehicle
    Dim Motorbike As clsVehicle
    
    ' Inicializace objekt pomoc New
    Set Car = New clsVehicle
    Set Bus = New clsVehicle
    Set Motorbike = New clsVehicle
    
    ' Nastaven informac o vozidlech
    Car.SetVehicleInfo "Auto", "koda Octavia", 2021, 5, 200
    Bus.SetVehicleInfo "Autobus", "Iveco", 2019, 30, 120
    Motorbike.SetVehicleInfo "Motorka", "Honda CBR", 2022, 2, 300
       
    ' Vpis informac do textovch pol
    MsgBox Car.GetVehicleInfo
    MsgBox Bus.GetVehicleInfo
    MsgBox Motorbike.GetVehicleInfo
End Sub

