This lesson we will simulate behavior of ants.

Use this class for the exercises.

  1. Create a class Food.

  2. Create the class Environment that will store the location of food on a grid.

  3. Create a class Ant.

    Each ant has at least a location, a flag indicating whether it is carrying food and a lifespan.

    The behavior of ants is as follows:

  4. Create a class AntFarm.

  5. Implement methods for displaying an ant farm.

    Create a main function that creates an AntFarm and runs it onf a 30x30 area.