-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddress.java
More file actions
77 lines (62 loc) · 1.61 KB
/
Copy pathAddress.java
File metadata and controls
77 lines (62 loc) · 1.61 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import java.io.Serializable;
public class Address implements Serializable {
private String number;
private String road;
private String town;
private int postalCode;
private String country;
/*default constructor*/
public Address(){
this.number = null;
this.road = null;
this.town = null;
this.postalCode = 0;
this.country = null;
}
public Address(String number, String road, String town,
int postalCode, String country){
this.number = number;
this.road = road;
this.town = town;
this.postalCode = postalCode;
this.country = country;
}
public String getNumber(){
return this.number;
}
public void setNumber(String number){
this.number = number;
}
public String getRoad(){
return this.road;
}
public void setRoad(String road){
this.road = road;
}
public String getTown(){
return this.town;
}
public void setTown(String town){
this.town = town;
}
public int getPostalCode(){
return this.postalCode;
}
public void setPostalCode(int postalCode){
this.postalCode = postalCode;
}
public String getCountry(){
return this.country;
}
public void setCountry(String country){
this.country = country;
}
@Override
public String toString(){
return "No: "+this.getNumber()+"\n"
+this.getRoad()+"\n"
+this.getTown()+"\n"
+this.getCountry()+"\n"
+this.getPostalCode();
}
}