diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-11-28 17:26:19 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-11-28 17:26:19 -0500 |
| commit | 6654546671eea9f9becd32b3160a134802659cbc (patch) | |
| tree | cefc60b322c4d2a2849bbec83682f379965ab48c /src/main/java/derms/replica/replica2/City.java | |
| parent | f3d0bfd50bdde4f96dc8ee603a7093d68201f114 (diff) | |
| download | soen423-6654546671eea9f9becd32b3160a134802659cbc.zip | |
Replica2: restrict scope
Diffstat (limited to 'src/main/java/derms/replica/replica2/City.java')
| -rw-r--r-- | src/main/java/derms/replica/replica2/City.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/derms/replica/replica2/City.java b/src/main/java/derms/replica/replica2/City.java index b027d44..63aa2cd 100644 --- a/src/main/java/derms/replica/replica2/City.java +++ b/src/main/java/derms/replica/replica2/City.java @@ -2,18 +2,18 @@ package derms.replica.replica2; import java.io.Serializable; -public class City implements Serializable { - public static final int codeLen = 3; +class City implements Serializable { + static final int codeLen = 3; private String code; - public City(String code) throws IllegalArgumentException { + City(String code) throws IllegalArgumentException { if (code.length() != codeLen) throw new IllegalArgumentException("Invalid city: "+code+"; must be "+codeLen+" letters"); this.code = code; } - public City() { + City() { this("XXX"); } |