import java.io.*; import java.util.*; /** This class represents an address with three lines of information. E.g.,
1234 Broadway
Suite 98
New York, NY 10012
The address lines are maintained as Strings with no structure. I.e., structured fields such as city name, postal code, etc., are just part of the String, and are not identified individually. There is no requirement that an Address instance should have all lines filled, or even that it have any lines filled. */ public class Address { /** Holds the first line of the address. */ private String addressLine1; /** Holds the second line of the address. */ private String addressLine2; /** Holds the third line of the address. */ private String addressLine3; /** Create an Address instance with empty lines. */ public Address() { addressLine1 = new String(""); addressLine2 = new String(""); addressLine2 = new String(""); } /** Return the first address line. */ public String getLine1() { return addressLine1; } /** Return the second address line. */ public String getLine2() { return addressLine2; } /** Return the third address line. */ public String getLine3() { return addressLine3; } /** Set the first address line. */ public void setLine1(String aString) { addressLine1 = aString; } /** Set the second address line. */ public void setLine2(String aString) { addressLine2 = aString; } /** Set the third address line. */ public void setLine3(String aString) { addressLine3 = aString; } }