def prompt_init(): """ This method calls the parent methods prompt_init(), which asks user to initialize appropriate instances of classes House and Rental. :return: an instance which represents house for rent - inherits from House and Rental. """ init = House.prompt_init() init.update(Rental.prompt_init()) return init
def prompt_init(): init = House.prompt_init() init.update(Purchase.prompt_init()) return init #Sets the prompt to set de values #init = HousePurchase.prompt_init() #print(init) #with the data setted, instance a object and sets # the data(**) by the constructor #house = HousePurchase(**init) #print(house.__dict__, '--->') #show data for a purchase house #house.display()
def prompt_init(): init = House.prompt_init() init.update(Rental.prompt_init()) return init
def prompt_init(): init = House.prompt_init() init.update(Purchase.prompt_init()) return init