public class SpeciesSecondTryDemo
1:
2: /**
3: Demonstrates the use of a parameter
4: with the method projectedPopulation.
5: */
6: public class SpeciesSecondTryDemo
7: {
8: public static void main(String[] args)
9: {
10: SpeciesSecondTry speciesOfTheMonth = new SpeciesSecondTry( );
11: int futurePopulation;
12: System.out.println("Enter data on the Species of the Month:");
13: speciesOfTheMonth.readInput( );
14: speciesOfTheMonth.writeOutput( );
15: futurePopulation = speciesOfTheMonth.projectedPopulation(10);
16: System.out.println("In ten years the population will be " +
17: futurePopulation);
18: speciesOfTheMonth.name = "Klingon ox";
19: speciesOfTheMonth.population = 10;
20: speciesOfTheMonth.growthRate = 15;
21: System.out.println("The new Species of the Month:");
22: speciesOfTheMonth.writeOutput( );
23: System.out.println("In ten years the population will be " +
24: speciesOfTheMonth.projectedPopulation(10));
25: }
26: }