A simple console-based zoo management system built in Java, designed to demonstrate core Object-Oriented Programming (OOP) principles.
π Developed as part of an academic assignment during my MSc in Informatics.
- Add new animals (Lion, Giraffe, Zebra, Hippo) to the zoo
- Search animals by name or code
- Remove animals by code
- Feed animals (interface-based polymorphic behavior)
- Save/load animal data using Java serialization
- Abstract Classes & Inheritance: A generic
animalabstract class with subclasses (lion,zebra,hippo,giraffe) - Interfaces:
IFeedAnimalinterface implemented differently per animal - Encapsulation: Private fields with getters/setters
- Polymorphism: Overridden
toString()andfeedAnimal()behavior - Serialization: Saving/loading objects via
zoo_animals.ser
- Java 17+
- Java Serialization
- Console I/O
- Clone the repository
- Compile with any Java IDE
- Run the
SerializationActionsclass to use the zoo app
- Download the zip file
- Open a terminal and navigate to the project root directory (
JavaZooApp-main). - Compile the Java source files to an
outfolder and run theSerializationActionsclass:
javac -d out src/zooProject/*.java
java -cp out zooProject.SerializationActions