Want to point out something: Inheritance is wrong. Buying isn't Student nor Car
Better buying class would be
class Buying: # also, naming stuff - hard but worth it
def __init__(self, buyer: Student, car: Car):
self._buyer = buyer # also you could implement .copy() method
self._car = car # .copy()
def buyer_info(self):
self._buyer.info()
self._car.car_info()
View all comments
1
u/Money_Ad_5277 2h ago
OOP. Cool!
Want to point out something:
Inheritance is wrong. Buying isn't Student nor Car
Better buying class would be