This project represents a virtual zoo, written in an object-oriented way. The content is divided into various modules that cover animal abstractions, including definitions, types, enclosures, and the animals themselves. It was created to explore and show some object-oriented programming strategies in Python, while coming from a Java background. Especially, how encapsulation, abstraction, inheritance and polymorphism can be implemented in Python.
The project was made in the second year of my apprenticeship and serves to showcase work samples. It is based on a Java Assignment.
Interesting Concepts used in this project:
- Multiple inheritance, which is non-existing in most programming languages:
- with Abstract Base Class (ABC classes)
- Method Decorators for properties and abstract methods:
@foo_setter.setter
or@abstractmethod
- Dunder Methods or Magic Method for human-readable object representation:
def __repr__()
Entry point of the project is Zoo.py and has some example code.
Simply clone this repository run Zoo.py or/and feel free to experiment with the other classes.
- Python 3 or higher is recommended. (The project only uses built-in libraries)