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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!