Back to All Projects

Rainforest Ecosystem Simulation

Pallavi K V - BCA 1st Year

This code simulates a rainforest ecosystem with plants and animals using object-oriented programming. Plants grow based on rainfall, while animals (classified as predators or prey) move, eat, and interact with each other. Predators hunt prey for energy, while prey feed on plants. The rainforest's climate (temperature, humidity, and rainfall) changes randomly to influence growth and interactions. The simulation continuously updates and displays plants as green circles, prey as blue circles, and predators as red circles, creating a dynamic and balanced virtual ecosystem. It visually represents how plants and animals coexist and depend on each other in nature.

Play Simulation