Implement a class RoachPopulation that simulates the growth of a roach population. The constructor takes the size of the initial roach population. The breed method simulates a period in which the roaches breed, which doubles their population. The spray method simulates spraying with insecticide, which reduces the population by 10%. The getRoaches method returns the current number of roaches. A program called RoachSimulation simulates a population that starts out with 10 roaches. Breed, spray, and print the roach count. Repeat three more times.

Complete the following files:

RoachPopulation.java

RoachPopulationTester.java

Use the following file:

RoachSimulation.java

/**
   This program simulates the growth of a roach population.
*/
public class RoachSimulation
{  
   public static void main(String[] args)
   {  
      RoachPopulation population = new RoachPopulation(10);
      
      population.breed();
      population.spray();
      System.out.print(population.getRoaches());
      System.out.println(" roaches");
      population.breed();
      population.spray();
      System.out.print(population.getRoaches());
      System.out.println(" roaches");
      population.breed();
      population.spray();
      System.out.print(population.getRoaches());
      System.out.println(" roaches");
      population.breed();
      population.spray();
      System.out.print(population.getRoaches());
      System.out.println(" roaches");
   }
}