# Hierarchical Level


class Vehicle:
    def setTopSpeed(self, speed):
        self.speed = speed
        print("Top speed is set to : ", self.speed)


class Car(Vehicle):
    def openTrunk(self):
        print("Car trunk open")


class Truck(Vehicle):
    def openTrunk(self):
        print("Car trunk open")


car = Car()
truck = Truck()

car.setTopSpeed(100)
print(car.speed)
truck.setTopSpeed(90)
print(truck.speed)