Addresses (2)

   // Address class continued
   public String getName() {
      return name;
   }
   public String getPhone() {
      return phone;
   }
   public String getAddress() {
      return address;
   }
   public void print() {
      System.out.println(name + "\n" +
            phone + "\n" + address);
   }
}


Slide 10 ©Copyright 1997 Jan Newmarch