Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me with this python program InfoTc 1040 Introduction to Problem Solving and Programming Animal Subclass In this programming assignment, you are going to
Please help me with this python program
InfoTc 1040 Introduction to Problem Solving and Programming Animal Subclass In this programming assignment, you are going to create two subclasses of the Animal class that is used to store information about either a mammal or a bird. You will then extend a program that takes user input, allowing the user to create multiple Mammal or Bird objects. Finally, you will retrieve the information stored in those objects and display it. Mammal Class Write a class named Mammal that inherits from Animal class that has the following additional attribute and method. This class should be written in the Animal.py file. Attributes hair color:a hidden attribute used to indicate the color of the mammal's hair Methods init__:this method should initialize the two attributes from the Animal class required in the Animal class'_init the single attribute listed above, and assign their default values. get hair_color: this method should return the value of the hair_color field. Bird Class Write a class named Bird that inherits from Animal class that has the following additional attribute and method. This class should be written in the Animalpy file Attributes can_fly: a hidden attribute used to indicate if the bird can fly Methods init : this method should initialize the two attributes from the Animal class required in the Animal class'_init_ the single attribute listed above, and assign their default values. get_can_fly: this method should return the value of the__can_fly fieldStep 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