has-many

Has-many relationship in classes

Has-many relationship in classes Question: I’m trying to get an idea of has-many relationship in python classes, although theoretically I understood the concept but when I try to implement it, I’m not getting correct output: Code: ## Animal is-a object class Animal(object): def sound(str): print(“sound of animals”) ## Dog is-a Animal, Dag has a name …

Total answers: 1