Question: Advanced Zoo Management System Objective: To develop a Python application utilizing inheritance, polymorphism, exception handling, and lists to manage various animals in a zoo effectively.

Advanced Zoo Management System
Objective:
To develop a Python application utilizing inheritance, polymorphism, exception handling, and lists to
manage various animals in a zoo effectively.
Instructions:
This assignment is to be completed individually.
Your code should be well-commented to explain the logic and functionality.
Submit all files in a single ZIP folder titled 'AdvancedZooManagement_YourName_StudentID'.
Requirements:
Part A: Class Design and Inheritance (30 Points)
Design a base class named 'Animal' and derive the following subclasses: 'Mammal', 'Bird', 'Reptile'.
Attributes:
'name' (str): the animal's name.
'age' (int): the animal's age in years.
'health_status' (str): the animal's health condition, acceptable values are 'Good', 'Fair', or 'Poor'.
Methods:
An '' method that initializes the attributes.
A 'display_info()' method to print details of the animal.
Specific behaviors:
'Mammal': 'give_birth()'- Outputs a message indicating the mammal has given birth.
'Bird': 'lay_eggs())- Outputs a message that the bird has laid eggs.
'Reptile': 'sun_bathe()'- Outputs a message about the reptile sunbathing.
Part B: Polymorphism (20 Points)
Implement a method 'make_sound()' that exhibits polymorphism:
'Mammal': Outputs "Various sounds depending on the species, e.g., Bark or Roar".
'Bird': Outputs "Chirps".
'Reptile': Outputs "Hisses".
Part C: Exception Handling (15 Points)
Implement basic exception handling for animal instantiation:
Handle exceptions such as invalid 'age' types and 'health_status' values not in the predefined list.
Use custom exceptions like 'InvalidAnimalError' for trying to add an undefined animal type.
Part D: Using Lists (15 Points)
Implement list functionalities to manage the zoo's animals:
Maintain a list of animals in the zoo.
Implement methods to add and remove animals from this list.
Use list methods such as 'append()', 'remove()', and 'pop()' appropriately.
Part E: Implementing and Demonstrating Functionality (20 Points)
Create a demonstration script that:
Instantiates each type of animal.
Demonstrates adding and removing animals from the zoo list.
Showcases exception handling by deliberately causing errors.
File Organization:
animals.py: This file will contain the definition of the base class Animal and all its subclasses Mammal,
Bird, and Reptile.
zoo.py: This file will contain the definition of the Zoo class which manages a collection of animals.
exceptions.py: This file will define custom exceptions that are used throughout the zoo management
system.
main.py: This file will be the entry point of the application, where instances of animals are created, added
to the zoo, and manipulated.
Advanced Zoo Management System Objective: To

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 Programming Questions!