-
Notifications
You must be signed in to change notification settings - Fork 0
/
Address.java
54 lines (43 loc) · 948 Bytes
/
Address.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//Address.java
//created by: Daniel Myers
import java.io.Serializable;
public class Address implements Serializable {
private static final long serialVersionUID = -706823771477674868L;
private String street;
private String city;
private String state;
private int zip;
public Address(String str, String c, String sta, int z){
setStreet(str);
setCity(c);
setState(sta);
setZip(z);
}
public void setStreet(String str){
street = str;
}
public String getStreet(){
return street;
}
public void setCity(String c){
city = c;
}
public String getCity(){
return city;
}
public void setState(String sta){
state = sta;
}
public String getState(){
return state;
}
public void setZip(int z){
zip = z;
}
public int getZip(){
return zip;
}
public String toString(){
return (getStreet() + "\n" + getCity() + ", " + getState() + " " + getZip());
}
}