Question
Develop a class Animal that contains the following attributes: * Species of type string * Language of type string * Age of type integer And
Develop a class Animal that contains the following attributes:
* Species of type string * Language of type string * Age of type integer
And the following methods:
* setSpecies(species) that allows user to set the objects species to the userspecified value. * setLanguage(language) that allows user to set the objects language to the userspecified value. * setAge(age) that allows user to set the objects age to the user-specified value. * An overloaded operator so that user can see the objects species, language, and age by typing its name
Sample output
>>> simba = Animal() >>> simba.setSpecies('lion') >>> simba.setLanguage('roar') >>> simba.setAge(5) >>> simba I am a lion, I roar, and I am 5 years old.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started