public class SpeciesFirstTryDemo
1:
2: public class SpeciesFirstTryDemo
3: {
4: public static void main(String[] args)
5: {
6: SpeciesFirstTry speciesOfTheMonth = new SpeciesFirstTry( );
7:
8: System.out.println("Enter data on the Species of the Month:");
9: speciesOfTheMonth.readInput( );
10: speciesOfTheMonth.writeOutput( );
11: int futurePopulation = speciesOfTheMonth.getPopulationIn10( );
12: System.out.println("In ten years the population will be " +
13: futurePopulation);
14:
15: //Change the species to show how to change
16: //the values of instance variables:
17: speciesOfTheMonth.name = "Klingon ox";
18: speciesOfTheMonth.population = 10;
19: speciesOfTheMonth.growthRate = 15;
20: System.out.println("The new Species of the Month:");
21: speciesOfTheMonth.writeOutput( );
22: System.out.println("In ten years the population will be " +
23: speciesOfTheMonth.getPopulationIn10( ));
24: }
25: }
26:
27:
28: