Skip to content

KrossKinetic/FoodPyramid

Repository files navigation

FoodPyramid

FoodPyramid is a simple program written in Java for simulating a Food Pyramid / Food Chain. It demonstrates the following skills :

  1. Ternary Trees  
  2. Tree Traversal (Preorder)  
  3. Node Insertion/Deletion  
  4. Data Encapsulation
  5. Exception Handling  
  6. Command-Line Interface (CLI)  
  7. Ecological Modeling

Original Question

In this assignment, you will be modeling an ecological pyramid using a ternary (3-child) tree data structure. Directly below is an example of an ecological pyramid, also called a food pyramid, that your ternary tree will be able to recreate. Please notice that each node represents a single species. In the diagram, animals are displayed with black text and arrows, and plants are displayed with green text and arrows. Animals can be both predators and prey, while plants are always prey and cannot predate on other organisms. In the context of the ternary tree, parent nodes are the predators of their children. The root of the tree is called the apex predator.

Understanding ecological pyramids and food patterns are essential in biological research to understand the concepts of biomass and energy transfer. Also, ecological pyramids are used to monitor organism diet, maintain healthy population balance, and foresee and defuse potential biotic dangers. Once your program is complete, the user should be able to construct a simple ecological pyramid like the one above using a ternary tree, and allow the user to interact with it.

Disclaimer

This repository contains projects completed as part of CSE214 at Stony Brook University. It is intended solely for personal learning and demonstration. Any use of this code for academic submissions or coursework is a violation of academic integrity policies.

This code is provided "as is" for educational and demonstrative purposes only. Reuse for academic coursework or submissions is strictly prohibited.

About

FoodPyramid is a simple program written in Java for simulating a Food Pyramid / Food Chain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages