'''
다중 상속인 경우 생성자는 나열된 순서의 첫번째 것으로 생성된다.
class FlyableUnit(Unit, Flyable): 이므로 Unit 의 init가 호출됨.
class FlyableUnit(Flyable,Unit): 였다면 Flyable 의 init가 호출됨
'''
dropship = FlyableUnit()
#=============== quiz =======================
#총 3대의 매물이 있습니다.
#강남 아파트 매매 10억 2010년
#마포 오피스텔 전세 5억 2007년
#송파 빌라 월세 500/50 2000년
class House:
#init
def init(self , location , house_type , deal_type , price , completion_year):
self.location = location
self.house_type = house_type
self.deal_type = deal_type
self.price = price
self.completion_year = completion_year
#data set
def show_detail(self):
#pass
print(self.location , self.house_type , self.deal_type\
,self.price , self.completion_year)
building = [] # list 생성된 객체들을 여기에 넣을꺼임.
building1 = House("강남" ,"아파트" ,"매매" ,"10억" ," 2010년")
building2 = House("마포" ,"오피스텔" ,"전세" ,"5억" ,"2007년")
building3 = House("송파" ,"빌라" ,"월세" ,"500/50" ,"2000년")
building.append(building1)
building.append(building2)
building.append(building3)
print("총 {} 대의 매물이 있습니다".format(len(building))) # len(ㅁ)
for apt in building:
apt.show_detail();