1 package com.sun.j2ee.blueprints.consumerwebsite; 2 3 public class Address { 4 private String streetName1; 5 private String streetName2; 6 private String city; 7 private String state; 8 private String zipCode; 9 private String country; 10 11 public Address() {} 12 13 public Address(String streetName1, String streetName2, String city, 14 String state, String zipCode, String country) { 15 this.streetName1 = streetName1; 16 this.streetName2 = streetName2; 17 this.city = city; 18 this.state = state; 19 this.zipCode = zipCode; 20 this.country = country; 21 return; 22 } 23 24 26 public String getStreetName1() { 27 return streetName1; 28 } 29 30 public String getStreetName2() { 31 return streetName2; 32 } 33 34 public String getCity() { 35 return city; 36 } 37 38 public String getState() { 39 return state; 40 } 41 42 public String getCountry() { 43 return country; 44 } 45 46 public String getZipCode() { 47 return zipCode; 48 } 49 50 52 public void setStreetName1(String streetName) { 53 this.streetName1 = streetName; 54 return; 55 } 56 57 public void setStreetName2(String streetName) { 58 this.streetName2 = streetName; 59 return; 60 } 61 62 public void setCity(String city) { 63 this.city = city; 64 return; 65 } 66 67 public void setState(String state) { 68 this.state = state; 69 return; 70 } 71 72 public void setCountry(String country) { 73 this.country = country; 74 return; 75 } 76 77 public void setZipCode(String zipCode) { 78 this.zipCode = zipCode; 79 return; 80 } 81 82 public String toString() { 83 return "Address[streeName1=" + streetName1 + ", " 84 + "streetName2=" + streetName2 + ", " 85 + "city=" + city + ", " 86 + "state=" + state + ", " 87 + "zipCode=" + zipCode + ", " 88 + "country=" + country + "]"; 89 } 90 } 91 92 93 | Popular Tags |