/*****************************************************************
** CityTest - test the 'City' class
**
** (c) Scott MacKenzie, 2000                             
******************************************************************/
public class CityTest
{
   public static void main(String[] args)
   {
      // instantiate a City object named 'homeTown'
      City homeTown = new City("Toronto", 3500000);

      // retrieve and print the 'name' field
      String s = homeTown.getName();
      System.out.println("I live in " + s);

      // retrieve and print the 'pop' field
      int count = homeTown.getPop() - 1;
      System.out.println("So do " + count + " others");

      // change the value of the 'pop' field
      homeTown.setPop(3750000);

      // output updated fields for 'homeTown' object
      System.out.println("Now there are " + homeTown.getPop() +
         " people in " + homeTown.getName());

      // print the 'homeTown' object (uses toString() method)
      System.out.println(homeTown);
   }
}

