 Bosala ndakisa ya monoko ya programmation oyo esangisi kosalela approche orientée objet.
Tala ndakisa oyo ezali kosalela Python, oyo ezali monoko ya programmation orienté objet. Toloba tolingi tosala classe pona motuka. Kelasi ekozala na bizaleli lokola make, model, mpe mbula, mpe ba méthodes lokola honk mpe drive. ```python class Motuka: def __init__(moi, kosala, modèle, mbula): self.make = kosala self.model = modèle self.mbula = mbula def honk(moi): imprimer("Beep beep!") def drive (self, vitesse): print(f"Motuka ezali kotambola na {vitesse} mph.") # kosala objet ya classe ya Motuka my_car = Car("Toyota", "Camry", 2019) # ko accéder na ba attributs ya objet imprimer (mon_car.make) # Toyota imprimer(mon_car.modèle) # Camry imprimer(mon_car.an) # 2019 # kobenga ba méthodes ya objet mon_car.honk() # Bip beep! my_car.drive(60) # Motuka ezali kotambola na 60 mph. ``` Na ndakisa oyo, tosali classe ya Car na ba attributs na ba méthodes. Na sima tosalaki objet ya classe ya Car, my_car, pe to accéder na ba attributs na yango pe to bengi ba méthodes na yango. Oyo ezali ndakisa ya approche orientée objet na programmation.