-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathPerson.java
More file actions
47 lines (34 loc) · 772 Bytes
/
Person.java
File metadata and controls
47 lines (34 loc) · 772 Bytes
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
package com.zipcodewilmington.person;
/**
* Created by leon on 2/12/18.
*/
public class Person {
private String name;
private int age;
public Person() {
name = "";
age = Integer.MAX_VALUE;
}
public Person(int personAge) {
age = personAge;
}
public Person(String nameOfPerson) {
name = nameOfPerson;
}
public Person(String nameOfPerson, int ageOfPerson) {
name = nameOfPerson;
age = ageOfPerson;
}
public void setName(String nameOfPerson) {
name = nameOfPerson;
}
public void setAge(int ageOfPerson) {
age = ageOfPerson;
}
public String getName() {
return name;
}
public Integer getAge() {
return age;
}
}