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