-
Notifications
You must be signed in to change notification settings - Fork 0
/
Address.java
46 lines (36 loc) · 1002 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
package se.miun.projekt;
/**
* Class which is called when implementing a person's address
* Uses all methods to form a complete home address along with a zipcode and city name
*/
public class Address {
private String address;
private String zipcode;
private String city;
public Address() {
this("unknown", "unknown", "unknown");
}
public Address(String address, String zipcode, String city) {
this.address = address;
this.zipcode = zipcode;
this.city = city;
}
public void setAddress(String address) {
this.address = address;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public void setCity(String city) {
this.city = city;
}
public String getAddress() {
return address;
}
public String getZipcode() {
return zipcode;
}
public String getCity() {
return city;
}
}