For Project 10, we dive into the Animal Kingdom, utilising Object-Oriented Programming (OOP) to create a dynamic and scalable zoo management system. This project leverages OOP to organise and modularise code in ways that make it more manageable and extendable. By engaging with this project, you'll see how OOP can be applied to manage complex systems and relationships, such as those found in a zoo.
Classes and Objects:
Master the use of classes and objects to represent various entities in a zoo.
Inheritance:
Learn to extend classes to create a hierarchical organization of animal types, promoting code reuse and simplicity.
Polymorphism:
Understand how objects of different classes can be treated as objects of a common superclass, particularly through method overriding, to handle various animal behaviors dynamically.
Encapsulation:
Explore how to protect object integrity by encapsulating data and defining interactions through methods in a class.
Link to Project 10 - Animal Kingdom
The three labs below will guide you through the completion of this project, each building on the knowledge gained in the previous one:
Lab 1 - Generalisation & Inheritance
Learn to apply generalisation and inheritance by creating a base Animal class and deriving specific animal types like Bird and Fish.
Establish the structure for defining and instantiating classes, setting the foundation for OOP principles in action.
Introduce and implement polymorphism by customising behaviors through method overriding in derived classes.
Illustrate how different animals can exhibit unique behaviors while sharing a common interface.
Develop a Zoo class that manages collections of animals, incorporating methods to add, manage, and interact with various animal instances.
Apply encapsulation to manage complex interactions within the zoo, showcasing practical applications of OOP in managing systems.